Sunday, 18 September 2016

computer science converting from binary to hexadecimal

To convert from binary to hexadecimal you have to go from binary to denary then denary to hexadecimal.

Hexadecimal only has 15 values and can only be read from 4 bit binary only.

1=1
2=2
3=3
4=4
5=5
6=6
7=7
8=8
9=9
10=A
11=B
12=C
13=D
14=E
15=F

Example

1100 0101

This will have to be split up from an 8 bit to a 4 bit
1100= 8+4
1100 would equal 12 in denary
12 would equal C hexadecimal

0101= 4+1
0101 would equal 5 in denary
5 would equal 5 in hexadecimal

Overall 1100 0101 is C5 in hexadecimal

No comments:

Post a Comment