Tuesday, October 27, 2015

Convert Binary to Hexadecimal and Conversely



Convert Binary to Hexadecimal

For you all the student in computer science who been learning the lesson, the introduction of informatinon technology, I share you a little about what you must know how to make a simulation program to convert binary to hexadicimal.

Hexa Decimal numbers are numbers that are 16,
That’s all  0,1,2,3,4,5,6,7,8,9, A, B, C, D, E, F

Well, lesson this time how to convert binary numbers (0 and 1)
to number Hexa (0,1,2,3,4,5,6,7,8,9, A, B, C, D, E, F).

Here's how:
Example 1.
1011010 binary = ........ Hexa
The way the formula is quite simple: take the 4 digit from the right and look
HEXA its value.
101 1010
5 A

Do you know? how can the concept remains the same: 8 4 2 1
and hex numbers are 0,1,2,3,4,5,6,7,8,9, A, B, C, D, E, F, so if passing of
9 then:
10 to A,
11 to B,
12 to C,
13 to D,
14 to E,
15 to F
and 16 be?
Yes,of course 10 Hexa

so the concept remains: 8 4 2 1
8 4 2 1     8 4 2 1
---------------------
  1 0 1     1 0 1 0
     5            A

Value,
101 = 4 + 1 = 5
1010  Value = 8 + 2 = A
so then 1011011 binary = 5A Hexa

Example 2:
1110101011101 binary = ..... Hexa
the STEP, make 4, 4 binary from right, namely:
1 1101 0101 1101
created:
8 4 2 1   8 4 2 1   8 4 2 1   8 4 2 1
-------------------------------------
         1   1 1 0 1   0 1 0 1   1 1 0 1
         1       D           5            D
then
value 1             = 1 = 1
value 1101       = 8 + 4 + 1 = D
value 0101       = 4 + 1 + 5
value 1101       = 8 + 4 + 1 = D
so the binary 1110101011101 = 1D5D
Hexa
do you feel it enough easy?
Follow back me HERE

No comments:

Post a Comment