Upload
sylvia-lyons
View
212
Download
0
Embed Size (px)
Citation preview
DIGITAL LANGUAGEDIGITAL LANGUAGE01101010011010101001001010101010100100101010110101001101010100100101010101010010010101
•bit: binary digit
•1 or 0
•binary language 2
DIGITAL WORDSDIGITAL WORDS
1 bit = 2 values
ONON 1
1 bit = 2 values
0
4 bit word (nybble) =
16 possibiliti
es 42
0000 0101 1010 0001 0110 1011 0010 0111 1100 0011 1000 1101 0100 1001 1110 1111
8 4 2 1
BYTE (by eight)= 256 possibilities 28
12864 3216 8 4 2 1
BYTE
TOTAL256 possibilities
255 + 1 (all 0s)
XXX XX X
O = on X = off
O O128643216 8 4 2 1
= ? 65
X O12864 32 16 8 4 2 1
= ?
XXXOOO
180
X12864 3216 8 4 2 1
= ?0
X X X XX X X
0 = white
O12864 32 16 8 4 2 1
= ?255
O O O OOO O
TOTAL POSSIBILITIES = 256
1 bit = a 1 or 0 (b)4 bits = 1 nybble (?)8 bits = 1 byte (B)1024 bytes = 1 Kilobyte (KB)1024 Kilobytes = 1 Megabyte (MB)1024 Megabytes = 1 Gigabyte (GB)1024 Gigabytes = 1 Terabyte (TB)
- kilo, meaning 1,000. (one thousand) 10^3 (Kilometer, 1,000 meters)- mega, meaning 1,000,000. (one million) 10^6 (Megawatt, 1,000,000 watts)- giga, meaning 1,000,000,000 (one billion) 10^9 (Gigawatt, 1,000,000,000 watts)- tera, meaning 1,000,000,000,000 (one trillion) 10^12
wikipedia
* 1-bit color (21 = 2 colors)
* 2-bit color (2² = 4 colors)
* 3-bit color (2³ = 8 colors)
* 4-bit color (24 = 16 colors)
* 5-bit color (25 = 32 colors)
* 8-bit color (28 = 256 colors)
* 12-bit color (212 = 4,096 colors)
* 16-bit color (216 = 65,536 colors)
1 bit2 colors1 bit
2 colors
2 bits4 colors
4 bits16 colors
8 bits256 colors
16 bits32,768 colors
32 bits16.7 million
colors
X X
X O
O
OO
X
=
=
=
=
1
0
2
3
or
or
or
or
2
3
4
1 or
or
or
or
MIDI•16 MIDI channels
•MIDI events
★note on = 001
★note off = 000•MIDI range
★notes = 128
★pan = 128
★volume = 128
MIDIMIDIMusical Instrument
Digital Interface
MIDI cables are serial, which only allows for bits to be transmitted one after another, in one direction.
0001010000110000010100000000000000111110101010
11010101001010000010100000000000000111110101010
closed loop
out
in
STATUS BYTESTATUS BYTE
INDICATOR BIT
MIDI EVENT
MIDI CHANNEL
O
INDICATOR BIT
DATA BYTE
X7 bits =
128 possibilities
O X
STATUS BYTE DATA BYTE
OOOO
MIDI CHANNEL
?
O
O
X
OXXX XXX
MIDI EVENTnote on
NOTE VALUE 64 = middle E
X
DATA BYTE
OOOOOOO
VELOCITY VALUE 128
= fff
X
OX
MIDI EVENTnote on
MIDI COMMANDSBIT REPRESENTATION
Note off 000Note on 001Polyphonic key pressure 010Control change 011Program change 100Channel pressure (aftertouch) 101Pitch bend 110
X
MIDI CHANNEL
#
OOOO
42
channel 1 = pianochannel 2 = horn
channel 3 = bagpipe
etc. through 16
DATA BYTE 128 values
128 notes128 volume levels
128 pan positions (l-r)128 patches/programs
Since binary numbers can get unwieldy when using large words, hexadecimal notation is often used to represent the values.
Hexadecimal represents 16 states from 0 to 15 using sixteen symbols 0-9 and A-F.
Each word is broken into 4-bit nibbles.
Hexadecimal
0000 = 00101 = 51010 = A0001 = 10110 = 61011 = B0010 = 20111 = 71100 = C 0011 = 31000 = 81101 = D0100 = 41001 = 91110 = E1111 = F
So a digital word such as 0001101111110100Would be represented in hexadecimal notation as: 1 B F 40001101111110100
Hex shorthand for nibbles