Computer Organization and Assembly Language Notes
Digital Computer
- A digital computer is a data processing machine operated automatically under the control of a list of instructions (a program) stored in its main memory.
Digital Computer System
- A digital computer system consists of interconnected digital hardware modules that accomplish a specific computing task.
- These modules include:
- CPU
- Main memory
- System interconnection
- Input/output
Organization of Components
- A computer’s organization is hierarchical.
- A hierarchical system is a set of interconnected subsystems, each of which is also hierarchical until we reach some lowest level of elementary subsystem.
- Each major component can be further described by decomposing it into its subcomponents.
- At each level, the designer is concerned with structure and function.
- Structure: The way in which components are interconnected.
- Function: The operation performed by a subsystem or an individual component.
- We follow a top-down approach, beginning with the major components of a computer, describing their structure and function, and proceeding to successively lower layers of the hierarchy.
Structure - Top Level
- Components:
- Computer
- Main Memory
- Input/Output
- Systems Interconnection
- Central Processing Unit
- Peripheral devices
- Communication Lines for external environment
Structure - The CPU
- Components:
- Arithmetic and Logic Unit (ALU)
- Control Unit
- Internal CPU Interconnection
- Registers
- Computer I/O Memory System
- CPU Interconnection
Structure - The Control Unit
- Components:
- CPU Control Memory
- Control Unit Registers and Decoders
- Sequencing Logic Unit
- ALU Registers
- Internal Control Bus
The Von Neumann Architecture
- Key Components:
- CPU (Control unit, ALU, Register)
- Main memory (stores instructions and data)
The Von Neumann Architecture Details
- Main memory stores programs and data.
- Control unit interprets instructions from memory for execution.
- Both data and instructions are loaded to the registers for processing.
- ALU performs the data processing functions.
- Instructions are executed sequentially unless the order is explicitly modified.
Function
- Computer functions include:
- Data movement
- Data storage
- Data processing
- Control
Functional Organization
- Involves:
- Operating Environment (source and destination of data)
- Data Movement Apparatus
- Control Mechanism
- Data Storage Facility
- Data Processing Facility
Operation
- Data Movement
- Storage
- Processing from/to Storage
- Processing from Storage to I/O
CPU Organization
- The internal organization of a computer system is best defined by the structure and functions of the hardware modules, for example the registers in CPU.
- Viewing a computer at this micro level is called the register transfer level.
Microoperation
- An elementary level operation (function) performed on one or more registers is called a microoperation.
- Examples of microoperations for “addition” operation:
- Load (replace the previous binary information of a register)
- Add
Register Transfer Language (RTL)
- A system of notations used to specify a digital system rather than using words.
- Register Transfer Language:
- A system to express a sequence of microoperations in symbolic form
- A convenient tool for describing the internal organization of digital computers
- Used to facilitate the design process of digital systems
Designation of Registers
- Registers are designated by capital letters, sometimes followed by numbers (e.g., A, R13, IR).
- Often the names indicate their function:
- MAR - memory address register
- PC - program counter
- IR - instruction register
- Registers and their contents can be viewed and represented in various ways.
Register Representation
- A register can be viewed as a single entity.
- Registers may also be represented showing the bits of data they contain.
- Common ways of drawing the block diagram of a register include showing individual bits and subfields.
- Examples include:
R1PC(H) and PC(L) showing higher and lower bytes of program counter
Basic Symbols for Register Transfers
| Symbols | Description | Examples |
|---|
| Capital letters | Denotes a register | MAR, R2 |
| Parentheses () | Denotes a part of a register | R2(0-7), R2(L) |
Arrow <- | Denotes transfer of information | R2 <- R1 |
Colon : | Denotes termination of control function | P: |
Comma , | Separates two microoperations | A <- B, C <- D |
Types of Microoperations
- Computer system microoperations are of four types:
- Register transfer microoperations
- Arithmetic microoperations
- Logic microoperations
- Shift microoperations
Register Transfer
- Copying the contents (information transfer) from one register to another is a register transfer.
- Symbolically, a register transfer is indicated by means of a replacement operator, as R2 <- R1
- In this case the contents of register R1 are copied (loaded) into register R2.
- A simultaneous transfer of all bits from the source R1 to the destination register R2.
- Note that this is a non-destructive; i.e. the contents of R1 are not altered by copying (loading) them to R2.
Register Transfer Implications
- A register transfer such as R2 <- R1 implies that the digital system has:
- the data lines from the source register (R1) to the destination register (R2)
- Parallel load capability at destination register (R2)
- Control lines to perform the action