Relative Content

Tag Archive for byte

How do you compress ASCII strings into fewer bytes?

I’m working with an embedded device with a unique protocol that sends messages to other devices and I’m making an application that parses the sent packets. Each packet carries 8 bytes. The protocol is defined as where first byte is header and remaining 7 bytes is the data.

How do I tell a user that bps means bits per second or bytes per second?

I’m writing an application that deals with the network and the hard drive. For the network portion, the application measures in bits per second, while the disk portion measures in bytes per second. This becomes an issue as they both are abbreviated b/s or bps everywhere I’ve seen. How could I inform the user that one means bits per second, while the other means bytes per second?

How to get from 1 byte to 2 bytes

We have 1 byte, which is 8 bits, which is 2^8. Now 2 bytes should be 2 * 1 byte, which is 2 * 2^8 = 2^9, but actually 2 bytes is 2^16. What am I missing here? It seems like 2 bytes isn’t 2 * 1 byte, it’s more like 1 byte * 1 byte, but this should give you byte^2, which doesn’t make sense.

How to get from 1 byte to 2 bytes

We have 1 byte, which is 8 bits, which is 2^8. Now 2 bytes should be 2 * 1 byte, which is 2 * 2^8 = 2^9, but actually 2 bytes is 2^16. What am I missing here? It seems like 2 bytes isn’t 2 * 1 byte, it’s more like 1 byte * 1 byte, but this should give you byte^2, which doesn’t make sense.

How to get from 1 byte to 2 bytes

We have 1 byte, which is 8 bits, which is 2^8. Now 2 bytes should be 2 * 1 byte, which is 2 * 2^8 = 2^9, but actually 2 bytes is 2^16. What am I missing here? It seems like 2 bytes isn’t 2 * 1 byte, it’s more like 1 byte * 1 byte, but this should give you byte^2, which doesn’t make sense.

How to get from 1 byte to 2 bytes

We have 1 byte, which is 8 bits, which is 2^8. Now 2 bytes should be 2 * 1 byte, which is 2 * 2^8 = 2^9, but actually 2 bytes is 2^16. What am I missing here? It seems like 2 bytes isn’t 2 * 1 byte, it’s more like 1 byte * 1 byte, but this should give you byte^2, which doesn’t make sense.

How to get from 1 byte to 2 bytes

We have 1 byte, which is 8 bits, which is 2^8. Now 2 bytes should be 2 * 1 byte, which is 2 * 2^8 = 2^9, but actually 2 bytes is 2^16. What am I missing here? It seems like 2 bytes isn’t 2 * 1 byte, it’s more like 1 byte * 1 byte, but this should give you byte^2, which doesn’t make sense.