Lecture 1
Lecture 1
Presented By:
Kavita Rathi Panwar
Assistant Professor
Assignment 1
Computer arithmetic –integer addition, subtraction and multiplication
Shift and add, Booth multiplier
Input unit: The source program/high level language program/coded information/simple data is fed to a computer through
input devices; keyboard is a most common type. Whenever a key is pressed, one corresponding word or number is translated
into its equivalent binary code over a cable and fed either to memory or process. Joysticks, trackballs, mouse, and scanners are
other input devices.
Output unit: These actually are the counterparts of input unit. Its basic function is to send the processed results to the
outside world.
Functional blocks of a computer
Control unit: It effectively is the nerve center that sends signals to other units and senses their states. The actual timing
signals that govern the transfer of data between input unit, processor, memory and output unit are generated by the control
unit.
Arithmetic logic unit (ALU): Most of the computer operators are executed in ALU of the processor like addition,
subtraction, division, multiplication, etc. the operands are brought into the ALU from memory and stored in high speed
storage elements called register. Then according to the instructions the operation is performed in the required sequence. The
control and the ALU are may times faster than other devices connected to a computer system. This enables a single processor to
control a number of external devices such as keyboards, displays, magnetic and optical disks, sensors and other mechanical
controllers.
Multilevel View Point of a machine
Multilevel View Point of a machine
Level 0: Digital Logic Level
• This level is where we find digital circuits (the chips).
• Digital circuits consist of gates and wires.
• These components implement the mathematical logic of all other levels.
• This level is where we view physical devices as just switches (On/Off).
• Instead of viewing their physical behaviour (i.e. in terms of voltages and currents) we use two value logic i.e.
0 (off) and 1(on)
Level 1: Control Level / Microarchitecture Level
• A control unit decodes and executes instructions and moves data through the system.
• Control units can be microprogrammed or hardwired.
Hardwired Control: Hardwired control units consist of hardware that directly executes machine instructions
I. The control logic is implemented with gates, flip flops, decoders, and other digital circuits.
II. It has the advantage that it can be optimized to produce a fast mode of operation.
III. Making any change is difficult
Microprogrammed Control: Microprogramed control unit is built around a storage unit called control memory
where all control signals are stored in program like format.
IV. Control memory stores a set of microprograms which are designed to implement instruction set.
V. Each instruction causes a set of microprogram to be fetched.
VI. And its control information is extracted in a manner that resembles the fetching and execution of program
from main memory.
VII. Design changes can be easy by just updating the contents of the control memory.
VIII.A microprogram is a program written in a low-level language that is implemented by the hardware.
Level 2: Machine Level
• Also known as the Instruction Set Architecture (ISA) Level.
• Consists of instructions that are particular to the architecture of the machine.
Instruction Set Architecture (ISA) The Instruction Set Architecture (ISA) is the part of the processor that
is visible to the programmer or compiler writer.
I. The ISA serves as the boundary between software and hardware.
II. An instruction set, or instruction set architecture (ISA), is the part of the computer architecture related to
programming, including the native data types, instructions, registers, addressing modes, memory architecture,
interrupt and exception handling, and external I/O.
III. An ISA includes a specification of the set of opcodes, the native commands implemented by a particular CPU
design.
Example: An operation (ADD) is a part of Instruction set stored in a memory. It is a binary code that tells
computer to perform ADD operation.
Level 3: System Software Level
• Acts upon assembly language produced from Level 5, as well as instructions programmed directly at this level.
• Lowest human readable form before dealing with 1s and 0s (machine language)
• Assembler converts assembly to machine language
Level 5: High-Level Language Level
• The level with which we interact when we write programs in languages such as C, Pascal, Lisp, and Java
• The level allows users to write their own application with languages such as C, Java and many more
• High-level languages are easier to read, write, and maintain
• User at this level sees very little of the lower level