Representing Data How does a computer represent data? In a digital format (series of 1s and 0s == binary number system) Bit - Each 1 or 0 in a digital format Byte - Group of bits to represent one character
Why binary is important It is the CPU’s native or machine language Is directly understandable by a computer’s CPU www.four-h.purdue.edu/ electric/
Number Systems Number Systems Unlike the decimal system, the binary number system (base 2) uses only two digits 0, and 1 Bit(b) vs. Byte(B) Bit Data using technologies that can be set to one of two states Byte Group of eight bits Number Systems
Number Systems Decimal Number System Binary Number System 100 1 20 1 101 10 21 2 102 100 22 4 103 1000 23 8 104 10000 24 16 105 100000 25 32 …. 26 64 27 128
Counting in Binary 0 = 00000000 1 = 00000001 2 = 00000010 3 = 00000011 Dec Bin 0 = 00000000 1 = 00000001 2 = 00000010 3 = 00000011 4 = 00000100 5 = 00000101 6 = 00000110 7 = 00000111 8 = 00001000 … 254= 11111110 255= 11111111
Converting Binary to Decimal
Converting Binary to Decimal
How do we represent the number 0 1 0 0 1 1 1 1 as a decimal? Let’s try another: How do we represent the number 0 1 0 0 1 1 1 1 as a decimal?
How do we represent the number 84 in binary? Converting Decimal to Binary How do we represent the number 84 in binary? 84 = 1 0 1 0 1 0 0
How do we represent the number 136 in binary? Let’s try another: How do we represent the number 136 in binary?