Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hexadecimal Binary Made Easier. Quick Recap Two different systems – Computers use binary – Binary is hard to read What is 1010001010111011?? SystemBaseSymbols.

Similar presentations


Presentation on theme: "Hexadecimal Binary Made Easier. Quick Recap Two different systems – Computers use binary – Binary is hard to read What is 1010001010111011?? SystemBaseSymbols."— Presentation transcript:

1 Hexadecimal Binary Made Easier

2 Quick Recap Two different systems – Computers use binary – Binary is hard to read What is 1010001010111011?? SystemBaseSymbols Used by humans? Used in computers? Decimal100, 1, … 9YesNo Binary20, 1NoYes

3 Middle Ground Need a system: – Easier to read – Converts easily to binary

4 Middle Ground Need a system: – Easier to read – Converts easily to binary Hexadecimal – base 16

5 Hexdecimal Base 16 – Each column is a power of 16: = 4096 * 2 + 256 * 0 + 16 * 5 + 1 * 9 = 8192 + 80 + 9 2059 16 = 8281 in decimal

6 13? How do we represent 13???

7 13? How do we represent 13??? – Use 0-9, A (10), B (11), C (12), D (13), E (14), F (15)

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 * 1 + 16 * 14 + 1 * 9 = 256 + 224 + 9 = 489

9 Counting Equivalent values : 12 10 = 1100 2 = C 16 DecimalBinaryHex 000 111 2102 3113 41004 51015 61106 71117 DecimalBinaryHex 810008 910019 101010A 111011B 121100C 131101D 141110E 151111F DecimalBinaryHex 161000010 171000111 181001012 191001113 201010014 211010115 221011016 231011117

10 Conversion Among Bases The possibilities: Hexadecimal Decimal Binary

11 Hex & Binary Each hex digit = 16 possible values 4 binary digits = 16 possible values (2 4 ) 1 hex digit = 4 binary digits DecimalBinaryHex 000 111 2102 3113 41004 51015 61106 71117 DecimalBinaryHex 810008 910019 101010A 111011B 121100C 131101D 141110E 151111F

12 Binary -> Hex Break binary value into groups of 4: 1001110100010110

13 Binary -> Hex Break binary value into groups of 4: 1001110100010110 Replace each group with 1 hex digit BinaryHex 00000 00011 00102 00113 01004 01015 01106 01117 10008 10019 1010A 1011B 1100C 1101D 1110E 1111F

14 Binary -> Hex Break binary value into groups of 4: 1001110100010110 9 D 1 6 Replace each group with 1 hex digit 1001110100010110 2 = 9D16 16 BinaryHexDecimal 000000 000111 001022 001133 010044 010155 011066 011177 100088 100199 1010A10 1011B11 1100C12 1101D13 1110E14 1111F15

15 Hex -> Binary Replace each hex digit with 4 binary digits: Ex: F2 F 2 1111 0010 F2 16 = 11110010 2 BinaryHex 00000 00011 00102 00113 01004 01015 01106 01117 10008 10019 1010A 1011B 1100C 1101D 1110E 1111F

16 Hex   Decimal Use a table Digits 0-F A = 10 B = 11 C = 12 D = 13 E = 14 F = 15

17 Hex   Decimal Use a table Digits 0-F A = 10 B = 11 C = 12 D = 13 E = 14 F = 15 256 x 1 + 16 x 12 + 1 x 7 = 256 + 192 + 7 = 455 1C7 16 = 455 10

18 Decimal   Hex Division / Multiplication methods: Current Value QuotientRemainder 455 ÷ 16 28 7 7 ÷ 16 1 12 (C)C7 1 ÷ 16 0 11C7

19 Summary Hex is a bridge: – Easier for us – Still just binary for computers SystemBaseSymbols Used by humans? Used in computers? Decimal100, 1, … 9YesNo Binary20, 1NoYes Hex160-9ABCDEF No, but better than binary No, but easily translates to binary

20 Colors Monitors make colors by mixing red/green/blue light: Typical 24 bits : 8 bits for each color – 2 8 = 256 possible values

21 Colors Hex Colors – Each color stored as 0-255 – 8 bits – 2 hex digits

22 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)


Download ppt "Hexadecimal Binary Made Easier. Quick Recap Two different systems – Computers use binary – Binary is hard to read What is 1010001010111011?? SystemBaseSymbols."

Similar presentations


Ads by Google