- Binary - Decimal
128 64 32 16 8 4 2 1
1 1 1 0 0 1 1 1
The numbers above the binary are the powers of two. The numbers that point to 1 must be added together to get the decimal form.
128+64+32+4+2+1=231
Therefore, 11100111 is equal to 231.
- Decimal - Binary
Subtract the highest power of two that is less than the binary from the binary. Continue on subtracting the powers of two from the binary, making sure that the difference is not negative. Whenever the power of two can be subtracted, put 1 under it, but if it can't be, put 0.
128 64 32 16 8 4 2 1
1 1 1 0 1 1 1 1
In this case, 16 got a 0 under it because the difference of 32 and 47 (which you get from subtracting 239 to 64 and 128) is 15. And if you subtract 15 to 16, you'll get a negative one.
So, 239=11101111
- Binary - Hexadecimal
Divide the binary every 4 bits starting from the right. For every set of bits, put the four lowest power of two from right to left. Add the ones which are pointed to 1.
1110 0111 1101
8421 8421 8421
= 14 7 13
Because the sum could only be up to 15, here are the corresponding values in hexadecimal:
0010 be continued...

Walang komento:
Mag-post ng isang Komento