A message in your game is 40 bits long. How many bytes is that?
A message in your game is forty bits long. The game displays its size in bytes. The message itself stays exactly the same, so why does the number on screen change?
You use ten different digits in decimal. Binary uses just two, zero and one. Read this row from left to right: one, zero, one, zero. Each zero counts as a digit too, so there are four digits in the row.
Watch the row fill with zeros and ones. Each position holds exactly one binary digit, called a bit. Count the eight positions in the row. A group of eight bits is called a byte.
You’re given the binary group one one zero zero, one zero one zero. How many bits are in that group? Count each position, including the zeros, and pick an answer.
Start with forty lowercase b, which means forty bits. You need eight bits for each byte, so divide forty by eight to count the groups. That gives five bytes. Write a capital B for bytes.
Now the message is written as forty-eight lowercase b. How many bytes is that? Read the unit first, then decide how to count groups of eight. Pick an answer.
This time you start with five capital B, which means five bytes. Each of those five groups contains eight bits. Multiply five by eight to count the bits in all the groups. You get forty bits, written with a lowercase b.
On the left, five lowercase b means five bits. On the right, five capital B means five bytes. It’s easy to overlook the capital and think the sizes match. But five bytes contains forty bits, so the two sizes are different.
If the exam asks for the number of bytes in fifty-six lowercase b, you’re starting with bits. Divide by eight to get seven bytes. If it asks for the number of bits in seven capital B, you’re starting with bytes. Multiply by eight to get fifty-six bits.