Documente Academic
Documente Profesional
Documente Cultură
Processor
Control Control Unit Unit Arithmetic Arithmetic Logic Unit (ALU) Logic Unit (ALU) Instructions Data Information
05 05/03/2012
Input Devices
Data
Memory
Instructions Data Information
Information
Output Devices
Storage Devices
2
Processor
The central processing unit (CPU)
Interprets and carries out basic instructions that operate a computer
Control unit directs and coordinates operations in computer Arithmetic logic unit Input (ALU) performs Devices arithmetic, comparison, and logical operations
Processor
Control Control Unit Unit Arithmetic Arithmetic Logic Unit (ALU) Logic Unit (ALU) Instructions Data Information
Processor
What is the machine cycle?
Four operations of the CPU comprise a machine cycle
Step 1. Fetch
Obtain program instruction or data item from memory
Memory
Data
Memory
Instructions Data Information
Information
Output Devices
Step 4. Store
Write result to memory
Processor
Step 2. Decode
Translate instruction into commands
ALU
Step 3. Execute
Carry out command
Control Unit
Storage Devices
Processor
Pipelining is where
The CPU begins fetching the second instruction before completing machine cycle for first instruction Results in faster processing
Processor
A register is
A temporary high-speed storage area that holds data and instructions
Stores location from where instruction was fetched Stores instruction while it is being decoded Stores results of calculation Stores data while ALU computes it
Processor
The system clock
Controls timing of all computer operations Generates regular electronic pulses, or ticks, that set operating pace of components of system unit
Processor
Parallel processing
Using multiple processors simultaneously to execute a program faster Requires special software to divide problem and bring results together
Control Processor
Processor 1
Memory
Processor 2
Memory
Processor 3
Memory
Processor 4
Memory
Pace of system clock is clock speed Most clock speeds are in the gigahertz (GHz) range (1 GHz = one billion ticks of system clock per second)
Processor speed can also be measured in millions of instructions per second (MIPS)
Results combined
Data Representation
How do computers represent data?
Most computers are digital
Recognize only two discrete states: on or off Use a binary system to recognize two states Use Number system with two unique digits: 0 and 1, called bits (short for binary digits)
Data Representation
A byte is
Eight bits grouped together as a unit Provides enough different combinations of 0s and 1s to represent 256 individual characters
Numbers Uppercase and lowercase letters Punctuation marks Other
10
Data Representation
How is a letter converted to binary form and back?
Step 1.
The user presses the capital letter D (shift+D key) on the keyboard.
Letter a b c d e f
ASCII Code 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
Binary 01100001 01100010 01100011 01100100 01100101 01100110 01100111 01101000 01101001 01101010 01101011 01101100 01101101 01101110 01101111 01110000 01110001 01110010 01110011 01110100 01110101 01110110 01110111 01111000 01111001 01111010
Letter A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
ASCII Code 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090
Binary 01000001 01000010 01000011 01000100 01000101 01000110 01000111 01001000 01001001 01001010 01001011 01001100 01001101 01001110 01001111 01010000 01010001 01010010 01010011 01010100 01010101 01010110 01010111 01011000 01011001 01011010
Step 2.
An electronic signal for the capital letter D is sent to the system unit.
g h i j k l m n o p q r
Step 4.
After processing, the binary code for the capital letter D is converted to an image, and displayed on the output device.
Step 3.
The signal for the capital letter D is converted to its ASCII binary code (01000100) and is stored in memory for processing.
s t u v w x
11
y z
13
14
Memory
Memory includes
Electronic components that store instructions, data and results Consists of one or more chips on the motherboard or other circuit board Each byte stored in unique location called an address, similar to seats in a concert hall
15 16
Voltage pulses corresponding to the ASCII codes would pass through the cable.
Memory
How is memory measured?
By number of bytes available for storage
Term Kilobyte Megabyte Gigabyte Terabyte Abbreviation KB or K MB GB TB Approximate Size 1 thousand bytes 1 million bytes 1 billion bytes 1 trillion bytes
Memory
What is random access memory (RAM)?
Memory chips that can be read from and written to by the processor(s)
Also called main memory or primary storage Most RAM is volatile, it is lost volatile, when computers power is turned off
Memory
How do program instructions transfer in and out of RAM?
RAM
Memory
dual inline memory module
program, the programs instructions are loaded into RAM from the hard disk. The word processing program, along with the Web Browser and certain operating system instructions are in RAM. The word processing program window is displayed on the screen.
memory chip
memory slot
19
20
Memory
Cache
Helps speed computer processes by storing frequently used instructions and data Also called memory cache
L1 cache built into processor L2 cache slower but has larger capacity L2 advanced transfer cache is faster, built directly on processor chip L3 cache is separate from processor chip on motherboard (L3 is only on computers that use L2 advanced transfer cache)
Memory
Read-Only Memory (ROM) includes
Memory chips that store permanent data and instructions Three types:
EEPROM (electrically Firmware Firmware erasable programmable Manufactured with read-only memory) eademory) permanently written Type of PROM data, instructions, containing microcode or information PROM programmer (programmable can erase read-only eadmemory) emory) Blank ROM chip onto which a programmer can write permanently
22
Nonvolatile memory, it is not memory, lost when computers power is turned off
21
Memory
Access time is
The amount of time it takes the processor to read data from memory Measured in nanoseconds (ns), one billionth of a second It takes 1/10 of a second to blink your eye; a computer can perform up to 10 million operations in same amount of time
Term Millisecond Microsecond Nanosecond Picosecond
BITS
Given 1 bit, how many distinct combinations of 1 bit exist? Given 4 bits, how many distinct combinations of 4 bits exist? Given n bits, how many distinct combinations of n bits exist?
23
BITS
A bit can take the values 0 or 1, thus it can describe 2 possibilities or can uniquely identify 2 things. Two bits can take the value 00, 01, 10, 11, thus it can describe four 22 possibilities or can uniquely identify 4 things. n bits can encode 2 power n (2n possibilities).
BITS
Assume there are 400 students in this campus. If every student is to be assigned a unique bit pattern, what is the minimum number of bits required to do this? How many more students can be admitted to this campus without requiring additional bits for each students unique bit pattern?
BITS
What is the minimum number of bits required to represent the last four digits of your roll number? Suppose that for village A, we need 8 bits to represent everyone uniquely. Similarly for village B, we need 9 bits. If both villages are combined into one big village, What is the minimum number of bits required to represent everyone uniquely in the combined village?