9/13 Binary Numbers, Digital Signals, & Binary Code
Download
Report
Transcript 9/13 Binary Numbers, Digital Signals, & Binary Code
9/17 Binary Code & CPUs
• Digital Signals
– digital versus analog, examples
• Binary Numbers
– Transistors: introduction
• Binary Code
– bits & bytes
– types: ASCII, UNICODE, EBCDIC
• CPUs
– Parts of a sample CPU
– Types of CPUs available
01101010011
01101
10010110
Digital Signals: why they are discussed.
• Virtually everything in a computer runs in a
digital system: data storage, communication,
output on the screen, …
• Everything is in its lowest form either ON or OFF,
UP or DOWN, YES or NO.
• Bits & bytes are combinations of digital signals
and codes.
Digital Signals: what are they?
• Digital signals have two settings: ON or OFF.
• Examples: smoke signals, Morse code, fluorescent
lights, pass or fail
• Anything that can be compared to ON or OFF can
be a digital signal:
–
–
–
–
Magnets: north or south
Voltage: high or low
Light: light or dark
Gates: open or shut
Digital Signals versus Analog Signals
• Digital signals have two
settings: ON or OFF.
• Analog signals have
Analog signal
Digital signal
ranges of settings:
dimmer switches, human voices, ocean waves
• Sound: Digital versus analog.
– Analog is a wave: continuous, gradual
– Digital is a step: non-continuous, ON/OFF
Binary Numbers
• A digital system
• Can represent any decimal
number with only two
characters: 0 & 1
• Why not use decimal
numbers? Computers
use digital systems
(on or off)
Decimal
0
1
2
3
4
5
6
7
8
9
10
11
12
Binary
0
1
10
11
100
101
110
111
1000
1001
1010
1011
1100
Transistors: tiny ON/OFF switches
• Tiny electrical gates with two paths:
1. Control path (gatekeeper)
2. Signal path (goes through gate)
• Only two possible states: gate is OPEN or gate is
CLOSED.
• Transistors are what make
up computer chips.
– AMD Athlon chip has 22
million transistors.
Image courtesy of AMD
Binary Code: Bits & Bytes
• Bit: a single element of code. 0 or 1.
– Contraction of “Binary digit”
• Byte: a collection of 8 bits. 00000000.
– Possible number of different bytes: 256
00000000 00000001 00000010 00000011 00000100
00000101 00000110 00000111 00001000 00001001
00001010 00001011 00001100 00001101 00001110
00001111 00010000 00010001 00010010 00010011
00010100 00010101 00010110 00010111 00011000
00011001 00011010 00011011 00011100 00011101
00011110 00011111 etc.
Binary Code: Bits & Bytes
• Each byte represents 1 character or command.
• A simple text file ( log.txt ) can be only a few
hundred bytes. A spreadsheet ( book1.xls ) can be
millions.
• kilobyte: KB 2 to the 10th (1,024) bytes.
megabyte: MB 2 to the 20th (1,048,576)
gigabyte: GB 2 to the 30th (1,073,741,824)
terabyte: TB 2 to the 40th (1,099,511,627,766)
When is a kilobyte NOT a kilobyte?
• Common usage (not exactly correct, but close)
• kilobyte:
KB 1,000 bytes
megabyte:
MB 1,000,000 bytes
gigabyte:
GB 1,000,000,000 bytes
terabyte:
TB 1,000,000,000,000 bytes
Why we don’t type in binary digits.
• Codes (lookup tables) in the computer.
• Each character corresponds to a byte.
• As we type, the keystrokes are translated into
bytes by the computer.
• The computer reverse-translates to show the
characters on the monitor.
• Common code sets: ASCII, UNICODE, EBCDIC
Code Types.
• ASCII “As-key” American Standard Code for
Information Interchange.
– 1st half of the slots in the table are for “standard”
ASCII characters. The second half contains the
“extended” ASCII character set.
• UNICODE uses 2 bytes/char rather than 1.
– Supports many more characters (34,168). Esp. used
for non-English languages
• EBCDIC “eb-see-dik” Extended Binary Coded
Decimal Interchange Code.
– Mainly used on mainframe computers
The CPU
• CPU terms
– capacity, -bit
– clock speed, MHz
– CISC, RISC
• CPU brands & models
image courtesy of AMD.com
CPU: Central Processing Unit
• The Microprocessor or
CPU (Central Processing
Unit) is the “brains” of
the computer.
• All other components
(RAM, monitor, disk
drive) act like bridges to
link you & the processor.
image courtesy of AMD.com
Coprocessors
• Coprocessors are also
in PC’s.
• They handle functions
like graphics, 3-D
acceleration, and sound
cards.
• Help reduce the load on
the main processor.
image courtesy of How Computers Work
Data Capacity
• refers to the amount of data that the processor can
process at one time. If a number is bigger than what the
processor can handle, it breaks it down into manageable parts,
processes it, and puts it back together.
• 8 bit processor: handles
numbers up to 8 bits long
(2 to the 8th power: 256)
• 16 bit processors handle
numbers up to 2 to the
16th power or 65,536)
• 32, 64 bit processing (etc.)
Clock Speed
• Timer that everything in the processor uses as a
pacesetter.
• Measured in MegaHertz (millions of cycles per
second)
• Same model of processors can have their
clock speeds compared.
• Different models of processors
cannot be compared so easily.
image from http://web.scps.k12.fl.us/site/agenda/default.htm
Instruction Sets
!
• A chip’s vocabulary.
• Types of instructions that a chip can perform.
• Bigger does not necessarily equal better in
instruction sets.
• CISC: Complex instruction set chips
– use complex instructions to process instructions.
• RISC: Reduced instruction set chips
– break down instructions before processing with a
simpler instruction set.
Types of chips: Intel
• Intel Pentium 4 – specs
– Up to 2.20 GHz
– Rapid execution engine
• Intel Pentium III - specs
– up to 1.33 GHz
– 70 new instructions for 3D, voice recognition, etc.
– integrated 256 KB L2 cache
• Intel Celeron - specs
– economy chip
– up to 1.30 MHz
– integrated 128 KB L2 cache
images courtesy of TigerDirect.com, Intel
Types of chips: AMD
• AMD Athlon XP - specs
–
–
–
–
Designed for Windows XP, (works w/ other OS’s)
Up to 1.67 GHz (but runs faster than Pentium 4 2.0 GHz)
integrated 256 KB L2 cache
266 MHz system bus
• AMD Athlon - specs
– up to 1.4 GHz
– integrated 256 KB L2 cache
– 266 MHz system bus
• AMD Duron – specs
– economical
– up to 1.3 GHz
– 128 KB L1 cache, 64 KB L2 cache
images courtesy of AMD
Types of Chips: Other Brands
•
•
•
•
•
Cyrix MII
Motorola PowerPC
Apple
Sun
Digital
• others available
images courtesy of Sun