Assemble Chapter 2
Assemble Chapter 2
ORGANIZATION
CHAPTER 2
ARCHITECTURE & ORGANIZATION
•Computer architecture
• Logical aspects of system implementation as seen by the programmer.
• E.g., instruction sets, instruction formats, data types, addressing modes.
• How do I design a computer?
•Computer organization
• Encompasses all physical aspects of computer systems.
• E.g., circuit design, control signals, memory types.
• How does a computer work?
ARCHITECTURE & ORGANIZATION
•Memory
• The storage area in which programs are kept when they are running and that
contains the data needed by the running programs
• The architecture of a memory defines the methods by which data may be
taken from and placed in the memory
• Structure of the elements that the memory hold
• The organization of a memory defines it’s physical structure , the physical
layout of data elements into memory units
BASIC COMPONENTS OF A COMPUTER
SYSTEM
•Input/output (I/O)
• The I/O architecture defines the form and conventions that must be used
in a program in order to move elements between I/O devices and memory
• The I/O organization defines structure of an I/O subsystems, how
functions are distributed between the elements, the various speeds of
different elements
BASIC COMPONENTS OF A COMPUTER
SYSTEM
BASIC COMPONENTS OF A COMPUTER
SYSTEM
• The main three components are interconnected by a system bus.
• The term “bus” is used to represent a group of electrical signals or the wires
that carry these signals
• the three major components of the system bus are the address bus, data bus,
and control bus.
• The control bus consists of a set of control signals include memory read,
memory write, I/O read, I/O write, interrupt, interrupt acknowledge, bus
request, and bus grant.
BASIC COMPONENTS OF A COMPUTER
SYSTEM
• The width of the address bus determines the memory addressing capacity of the
processor (Go to BOOK)
• The width of the data bus indicates the size of the data transferred between the
processor and memory or I/O device
• The processor usually always acts as the master of the system bus
THE PROCESSOR
• The processor acts as the controller of all actions or services provided by the
system. It can be thought of as executing the following cycle forever:
1. Fetch an instruction from the memory;
2. Decode the instruction (i.e., identify the instruction);
3. Execute the instruction (i.e., perform the action specified by the instruction).
• Decoding involves identifying the instruction that has been fetched from the
memory. To facilitate the decoding process, machine language instructions
follow a particular instruction encoding scheme.
•Three-Address Machines
•A = B + C * D - E + F + A
is converted to the following code:
mult T,C,D ; T = C*D
add T,T,B ; T = B + C*D
sub T,T,E ; T = B + C*D - E
add T,T,F ; T = B + C*D - E + F
add A,A,T ; A = B + C*D - E + F + A
NUMBER OF ADDRESSES
•Two-Address Machines
•A = B + C * D - E + F + A
load T,C ;T=C
mult T,D ; T = C*D
add T,B ; T = B + C*D
sub T,E ; T = B + C*D - E
add T,F ; T = B + C*D - E + F
add A,T ; A = B + C*D - E + F + A
NUMBER OF ADDRESSES
• One-Address Machines
• In accumulator machines, most operations are performed on the contents of
the accumulator and the operand supplied by the instruction.
• Thus, instructions for these machines need to specify only the address of a
single operand.
•Zero-Address Machines
• the locations of both operands are assumed to be at a default location.
• These machines use the stack as the source of the input operands and the
result goes back into the stack
• Stack is a LIFO (last-in–first-out) data structure that all processors
support
• All operations on this type of machine assume that the required input
operands are the top two values on the stack.
NUMBER OF ADDRESSES
•Branching
• Branching is implemented by means of a branch instruction. This instruction
carries the address of the target instruction explicitly. Branch instructions in
processors such as the Pentium are also called the jump instructions.
• Branches are one-way jumps: once the control has been transferred to the target
location, computation proceeds from that location (Figure 2.6)
•Procedure calls
• The use of procedures facilitates modular programming. Procedure calls are
slightly different from the branches. (Figure 2.7)
• We have to return control to the calling program after executing the procedure.
• This return requires two pieces of information
• End of Procedure: We have to indicate the end of the procedure so that the control can be
returned. This is normally done by a special return instruction.
• Return Address: This piece of information is normally stored when the procedure is called.
MEMORY
• Each byte in this memory can be identified by its sequence number starting
with 0, This is referred to as the memory address of the byte. (Fig 2.8)
• The actual memory in a system, however, is always less than or equal to the
memory address space.
TWO BASIC MEMORY OPERATIONS
• The memory unit supports two fundamental operations: read and write. The
read operation reads a previously stored data and the write operation stores a
value in memory.
• The address and data of the memory unit are connected to the address and data
buses, respectively. The read and write signals come from the control bus.
TWO BASIC MEMORY OPERATIONS
• Both volatile
• Power needed to preserve data
• Dynamic cell
• Simpler to build, smaller
• More dense
• Less expensive
• Needs refresh
• Larger memory units
• Static
• Faster
TYPES OF ROM
• Written during manufacture. Very expensive
• Programmable (once)
• PROM
• Needs special equipment to program
• Erasable
• Erasable Programmable (EPROM)
• Erased by UV
• Electrically Erasable (EEPROM)
• Takes much longer to write than read
• Flash memory
INPUT / OUTPUT
• I/O devices are not directly connected to the system bus. Instead, there is
usually an I/O controller that acts as an interface between the system and the
I/O device.
• There are two main reasons for using an I/O controller. First, different I/O
devices exhibit different characteristics and, if these devices were connected
directly, the processor would have to understand and respond appropriately to
each I/O device.
• In Windows, access to I/O devices can be obtained from two layers of system
software: the basic I/O system (BIOS), and the operating system.
• The amount of electrical power used to send signals on the system bus is very
low.
• I/O controllers typically contain driver hardware to send current over long
cables that connect the I/O devices
• I/O controllers typically have three types of internal registers—a data register, a
command register, and a status register.
REFERENCE
• Text book
• https://www.teachict.com/gcse_new/computer%20systems/cpu/miniweb/pg2.htm