Why computers use binary Bits & Bytes Why computers use binary
Analog Signals Analog signals : constantly changing values Difficult to make precise
Digital Digital signals : only allowed to have specific values
Binary Computers are digital systems with 2 possible states: on or off Called a binary system
Analog Signals Analog values converted to binary with a threshold value
Analog Implementation of Binary Even if actual values are somewhat noisy Correct binary value is preserved
Why Binary Unambiguous signals (easy to tell 1 from 0) Storing, copying data can be done without errors Simple, easy to build 1/0 easier to build than 1/2/3/4/5/6/7/8/9/0 Anything that can be represented with some sort of pattern can be represented with patterns of bits
Bits Bit : single on/off value Represented as: A mechanical electrical switch. Voltage on a wire. Magnetic field of a small slice of metal. A hole punched in a card. A tiny part of the light-reflecting surface of a CD. …
Bit Patterns One bit : 2 possible values: 0 1
Bit Patterns One bit : 2 possible values: 0 1 Two bits : 4 possible values 00 01 10 11
Bit Patterns Two bits : 4 possible values 00 01 10 11 Three bits : 8 possible values 000 100 001 101 010 110 011 111
Bit Patterns Four bits: 16 values Five bits: 32 values … n bits: 2n values
Bytes 1 bit (1/0) usually not useful on its own Usually work in larger chunks Byte : 8 bits Special names for large collections of bytes: Name Number of Bytes power of 2 byte 1 20 kilobyte (KB) 1024 210 megabyte (MB) 1,048,576 220 gigabyte (GB) 1,073,741,824 230 terabyte (TB) 1,099,511,627,776 240
Bytes How many bits is 6GB? Name Number of Bytes power of 2 byte 1 20 kilobyte (KB) 1024 210 megabyte (MB) 1,048,576 220 gigabyte (GB) 1,073,741,824 230 terabyte (TB) 1,099,511,627,776 240
Bytes How many bits is 6GB? = 6 x 230 bytes = 6 x 1,073,741,824 bytes = 6,442,450,944 bytes x 8 bits per byte = 51,539,607,552 bits Name Number of Bytes power of 2 byte 1 20 kilobyte (KB) 1024 210 megabyte (MB) 1,048,576 220 gigabyte (GB) 1,073,741,824 230 terabyte (TB) 1,099,511,627,776 240