Sunday 21 October 2012

Number System Conversion (by amirul firuz)

Decimal to Binary

Let's take 4310

read it from below to top, and you will get 1010112



Decimal to Hexadecimal

Let's take 241310

Weight
163
162
161
160
16-1
16-2
Value Represented
4096
256
16
1
0.0625
0.00390625

Hexadecimal

9
6
13 = D


2413 - (256 x = 2304) = 109
109 - (16 x 6 = 96) = 13
13 - (1 x 13 = 13) = 0            **13 in hexadecimal is D

the answer is 96D16 



Binary to Hexadecimal

Let's take 100011010011.11112

  1       0       0        0
  1        1       0       1
   0      0       1      1
.
   1       1       1      1
8(1)+4(0)+2(0)+1(0)
8(1)+4(1)+2(0)+1(1)
8(0)+4(0)+2(1)+1(1)
.
8(1)+4(1)+2(1)+1(1)
=8
=13 = D
=3
.
=15 =F

the answer is 8D3.F16




Hexadecimal to Binary

Let's take 15A.D16

1 digit in hexadecimal represent 4 digits in binary. We can do this directly.

116 = 110 = 00012
516 = 110 = 01012
A16 = 1010 = 10102
D16 = 1310 = 11012


Thus, 15A.D16 = 101011010.11012



No comments:

Post a Comment