Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

The BYTE value for 42 in binary is 00101010 - Can someone please explain this logic, as I could not understand clearly.

It can be difficult to understand. Simply put each number place represents a exponential value of 2. In the case of a byte it would be 1, 2, 4, 8, 16, 32, 64, and 128. A value of zero is like a No and a value of 1 is like a Yes for the number. Starting from the right this means you have 2 + 8 + 32 which equals 42. Depending on the character type the binary values can have other meanings but this is how the binary you have results in 42.

Let me know if you have any questions or need more information.

b0lsc0tt

Then if you do want other numbers explained please let us know what is not clear or understood about the explanation above. The comments seemed to be general enough to explain this already.

bol

bol

The reason I have given the figures 50, 44 and 88 is to try to understand how the bytes represent them and try to understand 0 is no and 1 is yes from the explanation said before.

"Simply put each number place represents a exponential value of 2. In the case of a byte it would be 1, 2, 4, 8, 16, 32, 64, and 128. A value of zero is like a No and a value of 1 is like a Yes for the number. Starting from the right this means you have 2 + 8 + 32 which equals 42. Depending on the character type the binary values can have other meanings but this is how the binary you have results in 42"

50 = 32+16+2

44 = 32+8+4

88 = 64+16+8

The value of 16, 4 & 1 is 0, then how can you take these numbers into account while representing 50, 44 & 88? This is still a bit of confusion.

What is the logic of 128 and 64 having the value of 0? Please help me to understand.

Thanks.

bol

32 16 8 4 2 1 successive powers of 2

1 1 0 0 1 0 = 110010

44 = 32+8+4

32 16 8 4 2 1

1 0 1 1 0 0 = 101100

88 = 64+16+8

64 32 16 8 4 2 1

1 0 1 1 0 0 0 = 1011000

an 8 bit value can represent any number between 0 and 255

128 64 32 16 8 4 2 1

0 0 0 0 0 0 0 0 = 0

1 1 1 1 1 1 1 1 = 128+64+32+16+8+4+2+1 = 255

AW

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.

128 64 32 16 8 4 2 1

0 0 1 0 1 0 1 0

32 + 8 + 2 = 42

Notice that each digit (bit), as read from right to left, represents a power of 2

In Decimal:

1000 100 10 1

0 0 4 2

40+2 = 42

each digit ('bit'), as read from right to left, represents a power of 10

AW