0% found this document useful (0 votes)
12 views

CO Design

Uploaded by

pandeyjiiiiii995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

CO Design

Uploaded by

pandeyjiiiiii995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Computer Architecture and

Organization
• In general terms, the architecture of a
computer system can be considered as a
catalogue of tools or attributes that are
visible to the user such as instruction sets,
number of bits used for data, addressing
techniques, etc.
Definition
• Whereas, Organization of a computer system
defines the way system is structured so that
all those catalogued tools can be used. The
significant components of Computer
organization are ALU, CPU, memory and
memory organization.
Computer Architecture Computer Organization

Computer Architecture is concerned with the way Computer Organization is concerned with the structure
hardware components are connected together to form a and behaviour of a computer system as seen by the user.
computer system.

It acts as the interface between hardware and software. It deals with the components of a connection in a system.

Computer Architecture helps us to understand the Computer Organization tells us how exactly all the units
functionalities of a system. in the system are arranged and interconnected.

A programmer can view architecture in terms of Whereas Organization expresses the realization of
instructions, addressing modes and registers. architecture.

While designing a computer system architecture is An organization is done on the basis of architecture.
considered first.

Computer Architecture deals with high-level design Computer Organization deals with low-level design
issues. issues.

Architecture involves Logic (Instruction sets, Addressing Organization involves Physical Components (Circuit
modes, Data types, Cache optimization) design, Adders, Signals, Peripherals)
• A computer instruction is a binary code that
specifies a sequence of microoperations for the
computer. The instruction code with the data
Instruction stored in memory.
• Generally, we can categorize instruction codes
Codes in and addresses into operation codes(Opcodes)
Computer and addresses. Opcodes specify how to perform
a specific instruction. An address specifies
Architecture which we should use- a register or an area, for a
particular action. Operands are precise
computer instructions that show what
information the computer requires to function.
What is the Instruction Code?
• Instruction codes are bits that instruct the computer to execute a
specific operation. An instruction comprises groups called fields.
These fields include:
• An instruction comprises groups called fields. These fields include:
• The Operation code (Opcode) field determines the process that needs
to perform.
• The Address field contains the operand's location, i.e., register or
memory location.
OPCODE
• The Opcode define operations such as add, subtract, etc.
• The Opcode must consist with n bits for a given 2^n distinct
operation.
• When this operation code is decoded in the control unit the computer
issues signals to read an operand from memory and add the operand
to processor register.
Stored Program
Organization
Structure of an Instruction Code
Indirect
Addressing
Lecture-Register
Computer Registers

Computer instructions are normally stored in consecutive memory locations


and are executed sequentially one at a time.

The instruction sequencing need a counter to calculate the address of the


next instruction after execution of the current instruction is completed.

The computer needs processor of registers for manipulating data and a


register for holding a memory address.
List of Registers
Program Counter
• The AR register is 12 bit which
is width of the memory
address.
• The PC register also 12 bit and
it hold the address of next
instruction.
• The PC goes through a counting
sequence until branch
encountered.
• The address part of the branch
is transferred into PC.
Common Bus System

• The basic computer has eight registers, a memory


unit, and a control unit.
• A efficient way to transfer information in between
these registers is to use common bus system.
• The output of seven registers and memory are
connected to the common bus.
• The selection lines are used to select register that
can use bus.
• The register whose LD(load) input is enable receive
the data from the bus.
Common Bus System

• Four Registers DR, AC, IR and TR have 16 bits


each.
• AR and PC are 12 bit registers.
• When AR and PC use bus the first 4 MSB are set
to 0.
• The INPR and OUTR have 8 bits each and
communicate with the eight LSB in the bus.
Common Bus System
• The 16 bit of bus receive information from six
registers and the memory.
• 5 registers have three control inputs LD, INR
and CLR.
• INPR receive character from the input device
and transferred to AC.
• OUTR receive character from the AC and
deliver it to an output device.
• The instruction code is also known as an instruction set. It is a collection of binary codes. It represents the
operations that a computer processor can perform. The structure of an instruction code can vary. It depends on
the architecture of the processor but generally consists of the following parts:
• Opcode: The opcode (Operation code) represents the operation that the processor must perform. It might
indicate that the instruction is an arithmetic operation such as addition, subtraction, multiplication, or division.

• Operand(s): The operand(s) represents the data that the operation must be performed on. This data can take
various forms, depending on the processor's architecture. It might be a register containing a value, a memory
address pointing to a location in memory where the data is stored, or a constant value embedded within the
instruction itself.

• Addressing mode: The addressing mode represents how the operand(s) can be interpreted. It might indicate that
the operand is a direct address in memory, an indirect address (i.e. a memory address stored in a register), or an
immediate value (i.e. a constant embedded within the instruction).
• Prefixes or modifiers: Some instruction sets may include additional prefixes or modifiers that modify the
behavior of the instruction. For example, they may specify that the operation should be performed only if a
specific condition is met or that the instruction should be executed repeatedly until a specific condition is met.
Types of Instruction Code
There are various types of instruction codes. They are classified based on
the number of operands, the type of operation performed, and the
addressing modes used. The following are some common types of
instruction codes:
• One-operand instructions: These instructions have one operand and
perform an operation on that operand. For example, the "neg"
instruction in the x86 assembly language negates the value of a single
operand.
• Two-operand instructions: These instructions have two operands and
perform an operation involving both. For example, the "add" instruction
in x86 assembly language adds two operands together
• Three-operand instructions: These instructions have three operands
and perform an operation that involves all three operands. For
example, the "fma" (fused multiply-add) instruction in some
processors multiplies two operands together, adds a third operand,
and stores the result in a fourth operand.
• Data transfer instructions: These instructions move data between
memory and registers or between registers. For example, the "mov"
instruction in the x86 assembly language moves data from one
location to another.
• Control transfer instructions: These instructions change the flow of
program execution by modifying the program counter. For example,
the "jmp" instruction in the x86 assembly language jumps to a
different location in the program.
• Arithmetic instructions: These instructions perform mathematical
operations on operands. For example, the "add" instruction in x86
assembly language adds two operands together.
• Logical instructions: These instructions perform logical operations on
operands. For example, the "and" instruction in x86 assembly
language performs a bitwise AND operation on two operands.
• Comparison instructions: These instructions compare two operands
and set a flag based on the result. For example, the "cmp" instruction
in x86 assembly language compares two operands and sets a flag
indicating whether they are equal, greater than, or less than.
• Floating-point instructions: These instructions perform arithmetic and
other operations on floating-point numbers. For example, the "fadd"
instruction in the x86 assembly language adds two floating-point
numbers together.
Opcodes
• An opcode is a collection of bits representing the basic operations,
including add, subtract, multiply, complement, and shift. The number
of bits required for the opcode is determined by the number of
functions the computer gives. For ‘2n’ operations, the minimum bits
accessible to the opcode should be ‘n’, where n is the number of bits.
We implement these operations on information saved in processor
registers or memory.
Types of Opcodes
There are three different types of instruction codes on the main
computer. The instruction's operation code (opcode) is 3 bits long, and
the remaining 13 bits are determined by the operation code
encountered.
There are three types of formats:
• Memory Reference Instruction: It specifies the address with 12 bits
and the addressing mode with 1 bit (I). For direct addresses, I equal 0,
while for indirect addresses, I equal 1.
• Register Reference Instruction: The opcode 111 with a 0 in the
leftmost bit of the instruction recognizes these instructions. The
remaining 12 bits specify the procedure to be carried out
• Input-Output Instruction: The operation code 111 with a 1 in the
leftmost bit of instruction recognizes these instructions. The input-
output action is specified using the remaining 12 bits.

You might also like