How to convert “Binary to Decimal” and “Decimal to Binary”?
Remember this chart
Binary Evaluation | 2^4 | 2^3 | 2^2 | 2^1 | 2^0 | | Value | Decimal Number |
Decimal Value | 16 | 8 | 4 | 2 | 1 | |||
| | 1 | 0 | 1 | 0 | > | 8+0+2+0 | 10 |
1 | 0 | 1 | 1 | 0 | > | 16+0+4+2+0 | 22 | |
1 | 1 | 0 | 0 | 1 | > | 16+8+0+0+1 | 25 | |
1 | 1 | 1 | 1 | 1 | > | 16+8+4+2+1 | 31 |
Example:
- Decimal to Binary
31-16=15
15-8=7
7-4=3
3-2=1
Example:
- Binary to Decimal
11111
(1*2^4)=16
(1*2^3)=8
(1*2^2)=4
(1*2^1)=2
(1*2^0)=1
No comments:
Post a Comment