ones and zeros
introductions
Conduct
Social Rules
- No feigning surprise
- No well-actuallys
- No back-seat driving
- No subtle-isms
recurse center <3
all your
feelings
are valid
ones and zeros
BETA!
(core content!)
(technical digressions!)
⚠ technical digression ⚠
ones and zeros
can you send messages
with just 1s and 0s?
how to count!
back to basics 🤓
the normal way
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, …
"Decimal"
"Base 10"
the normal way
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, …
"Decimal"
"Base 10"
first weird thing: from now on, we will start counting at zero
the normal way
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, …
"decimal"
"base 10"
something interesting happens here!
kill the 9s!
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, …
"base 9"
… 18, 19, 20, 21, …
… 88, 89, 90, 91, … 99, 100, 101, …
kill the 9s!
0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, …
"base 9"
… 18, 20, 21, …
… 88, 100, 101, …
how about the 8s!
0, 1, 2, 3, 4, 5, 6, 7, 10, 11, …
"octal"
"base 8"
… 16, 17, 20, 21, …
… 76, 77, 100, 101, …
POWER
OF TWO!
farewell 7s…
0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13, 14, 15, 16, 20, 21, 22, 23, 24, 25, 26, 30, …
"base 7"
… 63, 64, 65, 66, 100, 101, …
…
0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25, 30, …
"base 6"
… 45, 50, 51, 52, 53, 54, 55, 100, 101, …
…
0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 30, …
"base 5"
… 34, 40, 41, 42, 43, 44, 100, 101, …
…
0, 1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33, 100, 101, …
"base 4"
POWER
OF TWO!
…
0, 1, 2, 10, 11, 12, 20, 21, 22, 100, 101, …
"base 3"
drumroll...
the last two digits!
the last two digits!
0, 1, 10, 11, 100, 101, 110, 111, …
"binary!!!!!!!!"
"base 2"
POWER
OF TWO!
count to 10000
(in binary 😉)
places: decimal
eg: 9201
- 9 in the thousands column
- 2 in the hundreds column
- 0 tens
- 1 ones
place | name |
---|---|
1 | "ones" |
10 | "tens" |
100 | "hundreds" |
1000 | "thousands" |
⚠ technical digression ⚠
places: decimal
eg: 9201
- 9 * 1000 +
- 2 * 100 +
- 0 * 10 +
- 1 * 1
place | name |
---|---|
1 | "ones" |
10 | "tens" |
100 | "hundreds" |
1000 | "thousands" |
= 9000 + 200 + 0 + 1
= 9201
⚠ technical digression ⚠
places: decimal
eg: 9201
- 9 * 1000 +
- 2 * 100 +
- 0 * 10 +
- 1 * 1
place | name | aka |
---|---|---|
1 | "ones" | 100 |
10 | "tens" | 101 |
100 | "hundreds" | 102 |
1000 | "thousands" | 103 |
= 9000 + 200 + 0 + 1
= 9201
⚠ technical digression ⚠
places: binary!
place | name | i.e. |
---|---|---|
1 | "ones" | 20 |
10 | "twos" | 21 |
100 | "fours" | 22 |
1000 | "eights" | 23 |
1
|
1
|
10
|
2 |
11 | 3 |
100 | 4 |
101 | 5 |
110 | 6 |
111 | 7 |
1000 | 8 |
1001 | 9 |
1010 | 10 |
⚠ technical digression ⚠
places: binary!
eg: 1001
- 1 * 8 +
- 0 * 4 +
- 0 * 2 +
- 1 * 1
place | name | i.e. |
---|---|---|
1 | "ones" | 20 |
10 | "twos" | 21 |
100 | "fours" | 22 |
1000 | "eights" | 23 |
= 8 + 0 + 0 + 1
= 9
⚠ technical digression ⚠
send messages
with 1s and 0s?
hexadecimal
base 16!
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, …
⚠ technical digression ⚠
add some new digits here!
hexadecimal
base 16!
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, …
⚠ technical digression ⚠
12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F, 20, …
… 99, 9A, 9B, 9C, 9D, 9E, 9F, F0, F1, F2, …
… F9, FA, FB, FC, FD, FE, FF, 100, 101, 102, …
POWER
OF TWO!
hardware setup
power up! 🔌
arduino
thermal printer guts
(snacks!)
(foreshadowing snacks!)
bits & bytes
00001111
000000111
00000011
0000001
00001111
000000111
00000011
0000001
1 = 1
2 + 1 = 3
4 + 2 + 1 = 7
8 + 4 + 2 + 1 = 15
1 = 1
2 + 1 = 3
4 + 2 + 1 = 7
8 + 4 + 2 + 1 = 15
= B
= D
= H
= P
?????
bits & bytes
how computers store information
separating numbers
delays? spaces? newlines?
...chord hits?
00000010000001100000011100001111
0
1
2
4
1
2
3
8
8
256
9
512
10
1024
17
131,072
18
262,144
25
33,554,432
= 33,949,455 :/
can you send messages
with
just 1s and 0s?
"bytes"
if eggs came in packages of 8...
"bytes"
Every number is made of
exactly 8 bits (1s and 0s)
The highest number is only 255!
11111111 = 1 + 2 + ... + 127 = 255
00000010000001100000011100001111
00000010 00000110 00000111 00001111
= 2
= 6
= 7
= 15
= C
G
H
P ?????
ASCII!
dec | hex | binary | ascii |
---|---|---|---|
65 | 0x41 | 0b01000001 | A |
66 | 0x42 | 0b01000010 | B |
67 | 0x43 | 0b01000011 | C |
68 | 0x44 | 0b01000100 | D |
69 | 0x45 | 0b01000101 | E |
70 | 0x46 | 0b01000110 | F |
71 | 0x47 | 0b01000111 | G |
72 | 0x48 | 0b01001000 | H |
73 | 0x49 | 0b01001001 | I |
74 | 0x4A | 0b01001010 | J |
75 | 0x4B | 0b01001011 | K |
76 | 0x4C | 0b01001100 | L |
77 | 0x4D | 0b01001101 | M |
78 | 0x4E | 0b01001110 | N |
79 | 0x4F | 0b01001111 | O |
dec | hex | binary | ascii |
---|---|---|---|
80 | 0x50 | 0b01010000 | P |
81 | 0x51 | 0b01010001 | Q |
82 | 0x52 | 0b01010010 | R |
83 | 0x53 | 0b01010011 | S |
84 | 0x54 | 0b01010100 | T |
85 | 0x55 | 0b01010101 | U |
86 | 0x56 | 0b01010110 | V |
87 | 0x57 | 0b01010111 | W |
88 | 0x58 | 0b01011000 | X |
89 | 0x59 | 0b01011001 | Y |
90 | 0x59 | 0b01011010 | Z |
H
E
L
L
O
01001000 01000101 01001100 01001100 01001111
send messages
with 1s and 0s!
dec | hex | binary | ascii |
---|---|---|---|
65 | 0x41 | 0b01000001 | A |
66 | 0x42 | 0b01000010 | B |
67 | 0x43 | 0b01000011 | C |
68 | 0x44 | 0b01000100 | D |
69 | 0x45 | 0b01000101 | E |
70 | 0x46 | 0b01000110 | F |
71 | 0x47 | 0b01000111 | G |
72 | 0x48 | 0b01001000 | H |
73 | 0x49 | 0b01001001 | I |
74 | 0x4A | 0b01001010 | J |
75 | 0x4B | 0b01001011 | K |
76 | 0x4C | 0b01001100 | L |
77 | 0x4D | 0b01001101 | M |
78 | 0x4E | 0b01001110 | N |
79 | 0x4F | 0b01001111 | O |
dec | hex | binary | ascii |
---|---|---|---|
80 | 0x50 | 0b01010000 | P |
81 | 0x51 | 0b01010001 | Q |
82 | 0x52 | 0b01010010 | R |
83 | 0x53 | 0b01010011 | S |
84 | 0x54 | 0b01010100 | T |
85 | 0x55 | 0b01010101 | U |
86 | 0x56 | 0b01010110 | V |
87 | 0x57 | 0b01010111 | W |
88 | 0x58 | 0b01011000 | X |
89 | 0x59 | 0b01011001 | Y |
90 | 0x59 | 0b01011010 | Z |
???
00000010 00000110 0000111 00001111
[stx]
00000010 00000110 00000111 00001111
[ack]
[bel]
[si]
????
unicode
ò ж ҈ ☂ 🙀
⚠ technical digression ⚠
text: it�s hard
bigger numbers
and other kinds of data
⚠ technical digression ⚠
binary solo
✨️
(snack break)
computers talking
to each other
protocol
hardware setup
talking to the printer 🗣️
send messages
with 1s and 0s!
send images
with 1s and 0s!
thermal printer art
The Counter Button
(Object #1)
Ailadi, 2018
WeAreNotListening
Tape Recorders
Raphael Lozano-Hemmer (2011)
Remembering
Nitcha Fame Tothong (2018)
ones and zeros 2018-07-14
By Phil Schleihauf
ones and zeros 2018-07-14
- 763