Jump to content

Hexadecimal: Difference between revisions

Extended, including conversions from bin to hex without decimal.
mNo edit summary
(Extended, including conversions from bin to hex without decimal.)
Line 1:
[[Category:Encyclopedia]]Hexadecimal code is anothera numbercounting system used by computers. While decimal (our normal number system)that uses tensixteen digits, and binary uses two digits (0 and 1), hexadecimal uses base 16.
 
Instead of using only 0's and 1's like binary, or the characters 0- to 9 likeof the decimal, number system; hexadecimal uses the characters '0-9' justto like'9' baseto 10,represent butthe alsonumbers A-F.0 A=10,to B=119, and soalso forth.the Thesingle mostcharacters convenient method of converting binary'A' to hexadecimal'F' (foror sometimes 'a human) is' to first'f', separatebut theusually binarynot numbermixing into string of 4 digits. Thencase), convertto eachrepresent groupthe into basenumbers 10, atthrough whichto point 10-15, arein changedorder. into letters.
 
== Uses ==
Ex.
The hexadecimal number system is used widely in the Electronics and Computer Industry, as although digital electronics is based on gates with only two states and is therefore fundamentally binary, binary numbers can quickly become long and hard to transcribe without errors. Their hexadecimal equivalents are much shorter and easier to remember, and have a straight-forward way of conversion to/from binary.
10010111
 
1001 0110
== Comparing counts from zero in different number systems ==
2^3+2^0 2^2+2^1+2^0
8+1 4+2+1Binary
9 7Decimal
97 Hexadecimal
0 0 0
1 1 1
10 2 2
11 3 3
100 4 4
101 5 5
110 6 6
111 7 7
1000 8 8
1001 0110 9 9
1010 10 A
1011 11 B
1100 12 C
1101 13 D
1110 14 E
1111 15 F
10000 16 10
10001 17 11
10010 18 12
10011 19 13
10100 20 14
10101 21 15
10110 22 16
10111 23 17
11000 24 18
11001 25 19
11010 26 1A
11011 27 1B
11100 28 1C
11101 29 1D
11110 30 1E
11111 31 1F
100000 32 20
100001 33 21
 
== Converting binary to hexadecimal ==
# Split a binary number into groups of four digits, counting from right to left.
# Pad the leftmost group of binary digits with zeros on their left if their are less than four digits.
# Use the following table to translate each group of four binary digits, in order, to its hexadecimal equivalent.
Binary digits
Hexadecimal equivalent digit
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F
 
=== An example conversion ===
Binary Number: 1011010111
Split: 10 1101 0111
Pad: 0010 1101 0111
Translate groups: 2 D 7
Hexadecimal answer: 2D7
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.