Chapter HW 1

advertisement
Chapter HW 1
THE CENTRAL PROCESSING UNIT AND MEMORY
In this module we look hardware, the physical makeup of a computer system.
In this chapter we learn how computers work inside.
Two Types of Computers
 Digital Computers
– count
 Analog Computers
– Measure
When most people refer to a computer, they are referring to a digital computer but there is another kind, an
analog computer. The difference is that digital computers count and analog computers measure.
There are many simple analog computers in cars. More complex ones are used in chemical processing
plants. I have an uncle that worked for Exxon in Baton Rouge, La. He was in charge of an analog computer
system that ran an oil refining plant. It measured temperatures, pressures, and flow rates. It then opened
and closed valves all over the plant.
But, we’re interested in digital computers.
The CPU
 Control Unit
– Manages
 ALU
– Arithmetic
– Comparisons
 Registers
– Stage
 Bus
– Data flow
We learned that the heart of the computer is the CPU. If you could look inside of the CPU, it wouldn’t look
like this. This is just a diagram.
The CPU has two main sections.
The control unit is a manager that coordinates the operation of the CPU and controls the flow of data
which takes place on the bus. The control unit is not capable of performing instructions that do arithmetic
or comparisons.
The ALU or arithmetic/logic unit performs arithmetic and does logical comparisons.
Registers are high speed memory located inside the CPU. One reason that they are faster than main
memory is because they are so close. They are generally used to stage instructions and data while they are
being used in the CPU.
These parts of the CPU communicate over the bus which is the data path. The bus is also used to
communicate with the world outside of the CPU.
Memory
 Holds
– Programs and data that have been inputted
– Intermediate processing results
– Output that is ready to be sent to an output device
 Divided into locations
– Each location has a
unique address
– Each location has a value
The other component in the heart of the computer beside the CPU is memory.
Chapter HW1
Page 1
Memory holds programs and data that have been inputted into the computer, the intermediate results of
processing, and programs and data that are awaiting output. It is faster than external storage but it is more
expensive so it is just used temporarily.
Memory is divided into locations each of which as a unique address and holds a value.
Machine Cycles: Computer Speeds
 System Clock
– Synchronizes microcode
 Cycle Time
– Time to process one microcode instruction
– Milliseconds (thousandths, 1/1,000)
– Microseconds (millionths, 1/1,000,000)
– Nanoseconds (billionths, 1/1,000,000,000)
– Picoseconds (trillionths, 1/1,000,000,000,000)
Instructions are actually broken down into smaller instructions called microcode that control the operation
of the circuitry. Their execution is synchronized by a built in system clock.
The time required to complete a simple machine-level instruction is called the cycle time. This is one way to
represent computer speeds.
The lowest hardware performs an operation in milliseconds which is thousandths of a second.
Still faster is microseconds (millionths of a second), nanoseconds (billionths of a second), and picoseconds
(trillionths of a second).
Each one of these speeds is one one-thousandth of the previous.
Computer Speeds
 MHz - megahertz
– Millions of clock ticks per second
– Normal rating for microcomputers
 Mips
– Millions of instructions per second
– Normal rating for mainframes
The speed rating that you see most often for microcomputers is megahertz. Each megahertz is one million
clock ticks per second. The larger the number of clock ticks per second, the more instructions per second
can be done.
The original IBM PC was 4.77 MHz. The computer in my office is 500 megahertz. There are PC
compatibles that are 1300 MHz. You can see how much faster today’s microcomputer is.
This brings us to the third way to represent CPU speeds which is Mips or millions of instructions per
second. Mainframes are rated this way.
Binary
 States
– 0 State
– 1 State
 BIT = Binary Digit
As smart and as fast as computers are, internally they only speak binary. This means that there are only
two states: on and off, current or no current, magnetized and not magnetized, or 0 and 1.
The unit of storage that represents this binary digit is called a bit.
Numbers greater than one are made by using more than one bit.
Two bits are required to represent a maximum number of 3 or to have 4 values (0-3).
Four bits are required to represent a maximum number of 15 or to have 16 values (0-15).
Chapter HW1
Page 2
ASCII and EBCDIC
 American Standard Code for Information Interchange
– Used primarily on microcomputers
 Extended Binary-Coded Decimal Interchange Code
– Used primarily on IBM mainframes
But, because humans don’t speak in binary, we have to have a multi-bit code to represent our characters as
binary. The two most common of these are ASCII (American Standard Code for Information Interchange)
and EBCDIC (Extended Binary Coded Decimal Interchange Code).
EBCDIC is used on IBM mainframes. ASCII is used on almost everything else.
Look on page 13 at figure 1-6. This shows how characters are coded.
The original ASCII was a 7 bit code but has been expanded to 8 bits because today’s computers group bits
that way.
With 8 bits you can represent up to 256 different values or characters.
The Parity Bit
 Odd
 Even
There is often an extra hidden bit that goes along with a character that is used to detect errors. This bit is
called the parity bit.
In an odd parity system, if the on bits in a character are even, the parity bit is set on so that there will be an
odd number on. If the system detects a character without an odd number of bits on, it knows that there is an
error in that character.
In an even parity system, if the on bits in a character are odd, the parity bit is set on so that there will be an
even number on. If the system detects a character without an even number of bits on, it knows that there is
an error in that character.
Storage
 Byte - single character - 8 bits
 Word - bytes accessed as a unit
 Capacities
– kilobytes (KB)
1,024
~ 1,000
 thousands
– megabytes (MB) 1,048,576
~ 1,000,000
 millions
– gigabytes (GB)
1,073,741,824
~ 1,000,000,000
 billions
– terabytes (TB)
1,099,511,627,776
~ 1,000,000,000,000
 trillions
The 8 bits that represent one character in ASCII or EBCDIC is called a byte.
Multiple bytes that can be accessed as a unit by the CPU are called words.
Storage capacities are often referred to as kilobytes or KB. A kilobyte is actually 1,024 bytes but it is
approximately 1,000 bytes. Larger capacities are referred to in other terms:
A megabyte is approximately one million bytes.
A gigabyte is approximately one billion bytes.
A terabyte is approximately one trillion bytes.
Storage: Non-Text
 Graphic - Bit Mapped
– Monocrome - 1 bit
– 16 Colors - 4 bits
– 256 Colors - 1 byte
– 16.7M Colors - 3 bytes
 Graphic - Compression
– GIF, JPEG (JPG), TIFF, …
Chapter HW1
Page 3
 Audio, Video
– MP3, ...
Non-text data is stored in a variety of formats.
Graphic images can be represented by bit maps where every dot or pixel that goes to make up a picture is
described. The number of dots and the maximum number of colors possible in the picture will determine
how much storage is required to represent the picture.
There are compression techniques such as JPEG and GIF that reduce the amount of storage required.
There are also compression techniques used to store audio and video files.
System Unit - CPU Chip
In the introduction, we learned that the CPU is housed in the system unit. The system unit also contains
other components.
CPU Chips: Microprocessors
 IBM Compatible (To 1130Mhz = 1.13 Ghz)
– Intel (32 bit)



Pentium, Pentium Pro, MMX, II
Pentium III
Celeron, Xeon, Itanium (64 bit)
– AMD

K6, Athlon, Duron
– VIA Cyrix
 Motorola
– 68000 (to 1994)
– PowerPC (750, ...) w/IBM
These are some microprocessors that you might find today.
System Unit - System Board
The CPU plugs into the system board, sometimes called the mother board, which connects to all the other
components.
System Unit – Slots
On the system board, plugged into its bus, are expansion slots.
System Unit - Add-in Boards
Add-in boards plug into the expansion slots and increase the systems capabilities.
Portable - PC Card
One way that portable computers are expanded are through the use of PC Cards or PCMCIA cards,
Personal Computer Memory Card International Association.
PC Bus Standards
 IDE - Integrated Device Electronics =
– EIDE - Enhanced IDE
 PCI - Peripheral Component Interconnect
 SCSI - Small Computer Systems Interface (Ultra SCSI, Ultra Wide SCSI)
 USB - Universal
Serial Bus
 AGP, ATA, ...
These are common bus standards for add in boards and controllers.
Ports
Devices plug into expansion boards or the mother board through ports commonly found on the back of the
system unit.
Chapter HW1
Page 4
Some computers have ports such as USB ports on the front.
System Unit – Memory
Memory (or RAM for random access memory) also plugs into the system board. The data stored in RAM is
changed by instructions and is lost when the system is powered off.
There are other types of memory that you may find on the system board or on add-in boards.
ROM is read only memory. Unlike RAM, programs can’t change the value of ROM and it retains its value
when the system is turned off.
System Unit – Cache
Cache memory is a high speed memory that goes between the CPU and main memory. It is used as a
staging area to speed access to main memory’s data.
Many times there may be some cache memory on the CPU chip. In this case, it is called internal cache, as
opposed to external cache.
Main Storage
 RAM - Random Access Memory
– Windows 98/ME 16MB min.
– W/Browser 32MB min.
– Really need 64MB +
More for Win 2000
– DRAM -> EDO (60-80 NS)
– SDRAM (66, 100, 133 MHZ)
 Cache
– 128-512K
(Doesn’t cost much)
Main storage required for PC compatibles today depends on operating system and what programs you will
be running.
System Unit - Power Supply
A/C power goes into the power supply and is converted to a D/C power that the computer can use. This
power goes to the mother board and other devices.
System Unit – Peripherals
Peripheral devices such as diskette and hard-disk drives mount in the system unit. They require two flat
cables, one from the power supply and one from the system board.
End of
Chapter HW 1
THE CENTRAL PROCESSING UNIT AND MEMORY
In this chapter we’ve taken a look at the heart of the computer. In the next chapter we take a look a
secondary storage.
Key Terms
Add-in board. A circuit board or card that may be inserted into a slot within a computer's system unit to add
one or more functions.
ALU. See Arithmetic/logic unit.
Arithmetic/logic unit (ALU). The part of the CPU that contains the circuitry to perform arithmetic and
logical operations.
ASCII. A fixed-length, binary-based coding system widely used to represent data for computer processing
and communications. ASCII is used on most microcomputers.
Binary. The numbering system with two possible states.
Bit. A binary digit, such as 0 or 1.
Bus. Any path along which bits are transmitted.
Chapter HW1
Page 5
Byte. A configuration of eight bits used to represent a single character of data.
Cache memory. A storage area, faster than RAM, where the computer stores data it has most recent
accessed.
Control unit. The part of the CPU that coordinates its operation.
Digital computer. A device that counts.
EDBCDIC. A fixed-length, binary-based code widely used to represent data on IBM mainframes.
GB. See Gigabyte.
Gigabyte (GB). Approximately 1 billion bytes.
Internal storage. See Primary storage.
KB. See Kilobyte.
Kilobyte (KB). Approximately 1,000 (1,024 to be exact) bytes.
Machine cycle. A series of operations involved in the execution of a single machine-level instruction.
Machine language. A binary-based programming language that the computer can execute directly.
MB. See Megabyte.
Megabyte (MB). Approximately 1 million bytes.
Memory. See Primary storage.
Microcode. Instructions that are built into the CPU to control the operation of its circuitry.
Microsecond. One one-millionth of a second.
Millisecond. One one-thousandth of a second.
Nanosecond. One one-billionth of a second.
Parity bit. An extra bit added to the byte representations of characters to ensure that there is always either
an odd or even-number of 1-bits transmitted with each character. Used to check for errors.
PC card. A small card that fits into a slot on the exterior of a portable computer to provide new capabilities
but is also used sometimes to refer to an add-in board.
Picosecond. One one-trillionth of a second.
Port. A socket on the back of a computer's system unit into which a peripheral device may be plugged.
Primary storage. Memory. Hardware that holds the programs and data that have been inputted, intermediate
processing results, and programs and data waiting for output.
RAM. An acronym for random access memory. See primary storage.
Random access memory (RAM). See Primary storage.
Read-only memory (ROM). A software-in-hardware module from which the computer can read data, but to
which it cannot write data.
Register. A high-speed staging area within the CPU that temporarily stores data during processing.
ROM. See Read-only memory.
System board. The main circuit board of the computer; all computer-system components connect to it. Also
called a motherboard.
System clock. The timing mechanism within the computer system that governs the transmission of
instructions and data through the circuitry.
System unit. The hardware unit that houses the computer and its memory, as well as a number of other
devices.
TB. See Terabyte.
Terabyte (TB). Approximately 1 trillion bytes.
Word. A group of bits that the computer system treats as a single unit.
Chapter HW1
Page 6
Download