π’ Number Systems
Unit 2 β The internet | November 03Do Now (in Classroom)
The letter A
is represented by 65
in ASCII, the protocol used by most computers for text encoding.
American Standard Code for Information Interchange, a set of digital codes representing letters, numerals, and other symbols, widely used as a standard format in the transfer of text between computers.
Deep inside your computer, that 65
is sent in binary. What is 65
in binary?
π― Learning Targets
I can use number bases, including binary, decimal, and hexadecimal, to represent and investigate digital data.
I can explain why hexadecimal is used to represent digital data.
Review decimal & binary
Letβs write 15:
Decimal:
In decimal, we have 10 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
.
15 in decimal:
1000 | 100 | 10 | 1 |
---|---|---|---|
Β | Β | 1 | 5 |
Binary
In binary, we have 2 symbols: 0, 1
15 in binary:
8 | 4 | 2 | 1 |
---|---|---|---|
1 | 1 | 1 | 1 |
Binary numbers start to get very long, very quickly.
Hexawhatnow?
Hexadecimal - base 16
Hexadecimal
In hexadecimal, we have 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b ,c, d, e, f
Wait, what?
15 in hexadecimal is f
.
4096 | 256 | 16 | 1 |
---|---|---|---|
Β | Β | Β | f |
Notice!
- How many
bits
does it take to write 15 in decimal, binary, and hexadecimal? - Hex looks just like decimalβ¦until we try to write 16:
Hexadecimal
4096 | 256 | 16 | 1 |
---|---|---|---|
Β | Β | 1 | 0 |
Where have we seen hex before?
#E32173
Thatβs my favorite pink, Razzmatazz. Colors can be represented by mixing red, green, and blue. How much RGB is Razzmatazz?
Itβs 227 red, 33 g, and 115 blue. How do I know that?
Razzmatazz | R | G | B |
---|---|---|---|
Hex | E3 | 21 | 73 |
Decimal | 227 | 33 | 115 |