Download presentation
Presentation is loading. Please wait.
1
Hexadecimal Binary Made Easier
2
Quick Recap Number systems review: System Base Symbols Used by humans?
Used in computers? Decimal 10 0, 1, … 9 Yes No Binary 2 0, 1 Sort of
3
Middle Ground Need a system: Easier to read for people
Converts easily to binary
4
Middle Ground Need a system: Hexadecimal – base 16 Easier to read
Converts easily to binary Hexadecimal – base 16
5
Hexdecimal Base 16 Each column is a power of 16:
= 4096 * * * * 9 = = 8281 in decimal 4096’s 163 256’s 162 16’s 161 1’s 160 2 5 9
6
13? How do we represent 13??? 4096’s 163 256’s 162 16’s 161 1’s 160
7
13? How do we represent 13??? Use 0-9, A (10), B (11), C (12), D (13), E (14), F (15) 4096’s 163 256’s 162 16’s 161 1’s 160 D
8
16 Values Each column needs 16 values 0-15
Use 0-9, A (10), B (11), C (12), D (13), E (14), F (15) = 256 * * * 9 = = 489 4096’s 163 256’s 162 16’s 161 1’s 160 1 E 9
9
Counting Equivalent values : 1210 = 11002 = C16 1 2 10 3 11 4 100 5
Decimal Binary Hex 1 2 10 3 11 4 100 5 101 6 110 7 111 Decimal Binary Hex 8 1000 9 1001 10 1010 A 11 1011 B 12 1100 C 13 1101 D 14 1110 E 15 1111 F Decimal Binary Hex 16 10000 10 17 10001 11 18 10010 12 19 10011 13 20 10100 14 21 10101 15 22 10110 23 10111
10
Hex & Binary Each hex digit = 16 possible values
4 binary digits = 16 possible values (24) 1 hex digit = 4 binary digits Decimal Binary Hex 1 2 10 3 11 4 100 5 101 6 110 7 111 Decimal Binary Hex 8 1000 9 1001 10 1010 A 11 1011 B 12 1100 C 13 1101 D 14 1110 E 15 1111 F
11
Binary -> Hex Break binary value into groups of 4:
12
Binary -> Hex Break binary value into groups of 4: 1001110100010110
0000 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 Break binary value into groups of 4: Replace each group with 1 hex digit
13
Binary -> Hex Binary Hex Decimal 0000 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9 1010 A 10 1011 B 11 1100 C 12 1101 D 13 1110 E 14 1111 F 15 Break binary value into groups of 4: D Replace each group with 1 hex digit = 9D1616
14
Hex -> Binary Replace each hex digit with 4 binary digits: Ex: F2
0000 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 Replace each hex digit with 4 binary digits: Ex: F2 F F216 =
15
Hex Decimal Use a table Digits 0-F 4096’s 256’s 16’s 1’s
A = 10 B = 11 C = 12 D = 13 E = 14 F = 15 4096’s 163 256’s 162 16’s 161 1’s 160
16
Hex Decimal Use a table Digits 0-F 4096’s 256’s 16’s 1’s 1 C 7
A = 10 B = 11 C = 12 D = 13 E = 14 F = 15 4096’s 163 256’s 162 16’s 161 1’s 160 1 C 7 256 x x x 7 = = 455 1C716 =
17
Decimal Hex Division / Multiplication methods: ÷ 16 7 12 (C) C7
Current Value Quotient Remainder 455 ÷ 16 28 7 1 12 (C) C7 1C7
18
Summary Hex is a bridge: Easier for us Still just binary for computers
System Base Symbols Used by humans? Used in computers? Decimal 10 0, 1, … 9 Yes No Binary 2 0, 1 Hex 16 0-9ABCDEF No, but better than binary No, but easily translates to binary
19
Colors Monitors make colors by mixing red/green/blue light:
Typical 24 bits : 8 bits for each color 28 = 256 possible values
20
Colors Hex Colors Each color stored as 0-255 8 bits 2 hex digits
21
Web Colors Website colors often written in hex #RRGGBB
Two digits for red, two for green, two for blue Black #000000 (0,0,0) White #FFFFFF (255,255,255) Red #FF0000 (255,0,0) Lime #00FF00 (0,255,0) Blue #0000FF (0,0,255) Yellow #FFFF00 (255,255,0) Cyan / Aqua #00FFFF (0,255,255)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.