1 Chapter 1: Basic Concepts Assembly Language for Intel-Based Computers, 4th edition Kip R. Irvine.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
-
Upload
hilary-wilcox -
Category
Documents
-
view
235 -
download
1
Transcript of Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Computers organizationComputers organization& &
Assembly LanguageAssembly Language
Chapter 0Chapter 0
INTRODUCTION TO COMPUTING INTRODUCTION TO COMPUTINGBasic Concepts
Introduction to Introduction to ComputingComputing
Numbering and Coding Systems.Numbering and Coding Systems.
Inside the Computer.Inside the Computer.
Brief History of the CPU.Brief History of the CPU.
Computers organization & Assembly Language Computers organization & Assembly Language 22
Some Important Some Important TerminologyTerminology
How much memory?How much memory?
a a bitbit is a binary digit that can have the value 0 or 1.is a binary digit that can have the value 0 or 1.A A bytebyte is defined as 8 bits.is defined as 8 bits.A A nibblenibble is half a byte, or 4 bits.is half a byte, or 4 bits.A A wordword is two bytes, or 16 bits.is two bytes, or 16 bits.A A kilobytekilobyte ( (KK) ) is 2is 21010 bytes, which is 1024 bytes. bytes, which is 1024 bytes. A A megabytemegabyte ( (megmeg)) is 2 is 22020 bytes or 1024 K. bytes or 1024 K.AA gigabytegigabyte is 2is 23030 bytes or 1024 meg. bytes or 1024 meg. AA terabyteterabyte is 2is 24040 bytes or 1024 gig. bytes or 1024 gig.
33Computers organization & Assembly Language Computers organization & Assembly Language
Inside the ComputerInside the Computer
Two types of memory used in microcomputers are Two types of memory used in microcomputers are RAM and RAM and
ROM.ROM.
RAMRAM
– RAM stands for random access memory (called RAM stands for random access memory (called read/write memory). read/write memory).
– RAM is used by the computer for temporary storage of programs that it is RAM is used by the computer for temporary storage of programs that it is
running. running.
– RAM is sometimes called RAM is sometimes called volatile memory. volatile memory.
ROMROM
– ROMROM stands for read-only memory. It contains programs and information stands for read-only memory. It contains programs and information
essential to operation of the computer. essential to operation of the computer.
– It is called It is called nonvolatile memory.nonvolatile memory.
44Computers organization & Assembly Language Computers organization & Assembly Language
Inside the ComputerInside the Computer
CacheCache– A very fast type of RAM that is used to store A very fast type of RAM that is used to store
information that is most frequently or recently information that is most frequently or recently used by the computer used by the computer
– Recent computers have 2-levels of cache; the Recent computers have 2-levels of cache; the first level is faster but smaller in size (usually first level is faster but smaller in size (usually called internal cache), and the second level is called internal cache), and the second level is slower but larger in size (external cache). slower but larger in size (external cache).
Introduction to Microprocessors & Assembly Language Introduction to Microprocessors & Assembly Language 55
Typical Memory HierarchyTypical Memory Hierarchy
Introduction to Microprocessors & Assembly Language Introduction to Microprocessors & Assembly Language 66
Microprocessor
Registers
L1 Cache
L2 Cache
Memory
Disk, Tape, etc
Memory Bus
I/O Bus
Fas
ter
Big
ger
MemoryMemoryOrdered sequence of bytes
– The sequence number is called the memory address
Byte addressable memory
– Each byte has a unique address
– Supported by almost all processors
Physical address space
– Determined by the address bus width
– Pentium has a 32-bit address bus
Physical address space = 4GB = 232 bytes
– Itanium with a 64-bit address bus can support
Up to 264 bytes of physical address space
Address SpaceAddress Space
Address Space is the set of memory locations (bytes) that can be addressed
The Need for a Memory HierarchyThe Need for a Memory Hierarchy
Widening (expand) speed gap between CPU and main memory
– Processor operation takes less than 1 ns
– Main memory requires more than 50 ns to access
Each instruction involves at least one memory access
– One memory access to fetch the instruction
– Additional memory accesses for instructions involving memory data access
Memory bandwidth limits the instruction execution rate
Cache memory can help bridge the CPU-memory gap
Cache memory is small in size but fast
Internal organization of Internal organization of computerscomputers
1010Computers organization & Assembly Language Computers organization & Assembly Language
Internal organization of Internal organization of computerscomputers
CPUCPU (Central Processing Unit). Its function is (Central Processing Unit). Its function is to execute (process) information stored in to execute (process) information stored in memory.memory.I/OI/O (Input/Output) (Input/Output) DevicesDevices. They provide a . They provide a means of communicating with the CPU.means of communicating with the CPU.A A BusBus is a common group of wires that is a common group of wires that interconnect components in a computer system. interconnect components in a computer system. The buses that interconnect the sections of a The buses that interconnect the sections of a computer system transfer address, data, and computer system transfer address, data, and control information between the microprocessor control information between the microprocessor and its memory and I/O systems.and its memory and I/O systems.
1111Computers organization & Assembly Language Computers organization & Assembly Language
Internal organization of Internal organization of computerscomputers
TheThe addressaddress busbus requests a memory location from the requests a memory location from the memory or an I/O location from the I/O devices. If I/O is memory or an I/O location from the I/O devices. If I/O is addressed, the address bus contains a 16-bit I/O addressed, the address bus contains a 16-bit I/O address from 0000H through FFFFH. address from 0000H through FFFFH. TheThe datadata busbus transfers information between the transfers information between the microprocessor and its memory and I/O address space. microprocessor and its memory and I/O address space. Data transfers vary in size, from 8 bits wide to 64 bits Data transfers vary in size, from 8 bits wide to 64 bits wide in various members of the Intel microprocessor wide in various members of the Intel microprocessor family.family.TheThe controlcontrol busbus contains lines that select the memory contains lines that select the memory or I/O and cause them to perform a read or write or I/O and cause them to perform a read or write operation.operation.
1212Computers organization & Assembly Language Computers organization & Assembly Language
CPU Memory InterfaceCPU Memory InterfaceAddress Bus – Memory address is put on address bus– If memory address = m bits then 2m locations are
addressedData Bus: b-bit bi-directional bus– Data can be transferred in both directions on the data bus– Note that b is not necessary equal to w or s. So data
transfers might take more than a single cycle (if w > b) .Control Bus– Signals control
transfer of data– Read request– Write request– Complete transfer
Brief History of the CPUBrief History of the CPUThe heart of the computer system is the microprocessor The heart of the computer system is the microprocessor integrated circuit. integrated circuit. The microprocessor, sometimes referred to as the CPU The microprocessor, sometimes referred to as the CPU is the controlling element in a computer system. is the controlling element in a computer system. The microprocessor controls memory and I/O through a The microprocessor controls memory and I/O through a series of connections called buses. series of connections called buses. The microprocessor performs three main tasks for the The microprocessor performs three main tasks for the computer system: computer system: 1.1. data transfer between itself and the memory or I/O data transfer between itself and the memory or I/O
systems.systems.2.2. simple arithmetic and logic operations. simple arithmetic and logic operations. 3.3. program flow via simple decisions. Albeit these are program flow via simple decisions. Albeit these are
simple tasks, but through them, the microprocessor simple tasks, but through them, the microprocessor performs virtually any series of operations or tasks.performs virtually any series of operations or tasks.
1414Computers organization & Assembly Language Computers organization & Assembly Language
Processor consists of Datapath
ALU
Registers
Control unit
ALU Performs arithmetic
and logic instructions
Control unit (CU) Generates the control signals required to execute
instructions
Implementation varies from one processor to another
Processor (CPU)Processor (CPU)
Brief History of the CPUBrief History of the CPU
8080:8080: The world’s first 8-bit general-purpose microprocessor. The world’s first 8-bit general-purpose microprocessor. 8086:8086: A far more powerful, 16-bit machine. A far more powerful, 16-bit machine. 80286:80286: This extension of the 8086 with memory 16-MByte. This extension of the 8086 with memory 16-MByte.80386:80386: Intel’s first 32-bit machine, Intel’s first 32-bit machine, 80486:80486: Full cache technology and sophisticated instruction Full cache technology and sophisticated instruction pipelining. pipelining. Pentium:Pentium: Intel introduced the use of superscalar tech niques. Intel introduced the use of superscalar tech niques.Pentium Pro:Pentium Pro: Move into superscalar organization. Move into superscalar organization.Pentium II:Pentium II: The Pentium II incorporated Intel MMX technology. The Pentium II incorporated Intel MMX technology.Pentium III:Pentium III: Additional FP instructions to support 3D graphics. Additional FP instructions to support 3D graphics.Pentium 4:Pentium 4: Additional FP and other en hancements for Additional FP and other en hancements for multimedia.multimedia.Itanium:Itanium: This new generation of Intel processor makes use of a This new generation of Intel processor makes use of a 64-bit organi zation with the IA-64 architecture.64-bit organi zation with the IA-64 architecture.
1616Computers organization & Assembly Language Computers organization & Assembly Language
Brief History of the CPUBrief History of the CPU
1717Computers organization & Assembly Language Computers organization & Assembly Language
CISC and RISCCISC and RISC
CISCCISC refers to Complex Instruction Set Computer. refers to Complex Instruction Set Computer.
CISCCISC key features: key features:– Large and complex instruction setLarge and complex instruction set– Large instruction setsLarge instruction sets– More addressing modesMore addressing modes
– Variable width instructionsVariable width instructions– Requires microcode interpreterRequires microcode interpreter
Each instruction is decoded into a sequence of Each instruction is decoded into a sequence of micro-operationsmicro-operations
– Example: Intel x86 familyExample: Intel x86 family
1818Computers organization & Assembly Language Computers organization & Assembly Language
CISC and RISCCISC and RISC
RISCRISC refers to Reduced Instruction Set Computer refers to Reduced Instruction Set Computer
RISCRISC Key features: Key features:– Large number of general purpose registersLarge number of general purpose registers
– Small and simple instruction setSmall and simple instruction set– All instructions have the same widthAll instructions have the same width– Simpler instruction formats and addressing Simpler instruction formats and addressing
modesmodes– Decoded and executed directly by hardwareDecoded and executed directly by hardware– Examples: ARM, MIPS, PowerPC, SPARC, etc.Examples: ARM, MIPS, PowerPC, SPARC, etc.
Introduction to Microprocessors & Assembly Language Introduction to Microprocessors & Assembly Language 1919
2020
The EndThe End
Computers organization & Assembly Language Computers organization & Assembly Language