# Hex Conversion Instructions - Hexadecimal Conversion Instructions

Document Sample

```					           Hexadecimal Conversion Instructions
A big problem with the binary number system is verbosity. To represent the value 202
requires eight binary digits. The decimal version requires only three decimal digits and,
thus, represents numbers much more compactly than does the binary numbering system.
The hexadecimal system requires only 2 numbers to represent the same value. This fact
was not lost on the engineers who designed binary computer systems. When dealing with
large values, binary numbers quickly become too unwieldy. The hexadecimal (base 16)
numbering system solves these problems. Hexadecimal numbers offer the two features:

   hex numbers are very compact
   it is easy to convert from hex to binary and binary to hex.

Steps to convert Binary Numbers to Hexadecimal
Important point to remember: Each hexadecimal digit is equal to four binary bits

1) The first step is to pad the binary number with leading zeros to make sure that the
number of places in the binary number contains multiples of four bits. These zeros will be
added to the far left of the binary number or the MSB position. Count from right to left
and add as many zeros as necessary to make the number of places a multiple of 4. For
example – 110110 would be 00110110

2) Now, starting from the right, break the number into groups of 4. For example
00110110 would look like this 0011 0110

3) Look up the hexadecimal value of each individual group of 4 on the conversion chart.
0011 = 3 and 0110 would be 6. The hexadecimal number for 00110110 is 36.

1) No matter how big the hexadecimal number is you deal with each digit individually.
Look up the binary value for each individual digit on the conversion chart and write them
down. Example: the number AB would be: A = 1010 and B = 1011.

2) Now combine the two separate numbers into 1 binary number. Remember to keep
them in the proper order. Example: AB = 10101011
1) 1) No matter how big the hexadecimal number is you deal with each digit individually.
Look up the binary value for each individual digit on the conversion chart and write them
down. Example: the number AB would be: A = 1010 and B = 1011.

2) Now combine the two separate numbers into 1 binary number. Remember to keep
them in the proper order. Example: AB = 10101011

3) Place the binary number in the binary to decimal conversion chart.

128         64          32          16         8           4          2           1
1           0           1           0         1           0          1           1

4) Add together the decimal value of each column that has a binary 1. The sum will be
the decimal value of the hex number.

Example: 128 + 32 + 8 + 2 + 1 = 171

(Copied in part from Micro Engineering Labs Inc Website
http://picbasic.com/resources/articles/hexnumbers.htm)

```
DOCUMENT INFO
Shared By:
Categories:
Stats:
 views: 8 posted: 8/28/2010 language: English pages: 2
Jun Wang Dr
About Some of Those documents come from internet for research purpose,if you have the copyrights of one of them,tell me by mail vixychina@gmail.com.Thank you!