Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
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 1. Unambiguous signals (easy to tell 1 from 0) – Storing, copying data can be done without errors 2. Simple, easy to build – 1/0 easier to build than 1/2/3/4/5/6/7/8/9/0 3. 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: n 2 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