Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

Slide: 1

Computer Organization & Architecture


(KCS-302)
Mr. Aditya Tandon
Assistant Professor
Department of Computer Science and Engineering
Krishna Engineering College, Ghaziabad
aditya.tandon@krishnacollege.ac.in
Slide: 2

UNIT 1 – Lecture 6

• General Register Organization


• User-visible Registers
• Control & Status Registers

02/24/2023 @ Aditya Tandon


Slide: 3

User – visible Registers

• General Purpose Registers


• Data Registers
• Address Registers
• Condition codes

02/24/2023 @ Aditya Tandon


Slide: 4

General Purpose Registers

• Can be assigned to a variety of functions by the programmer.


• These mostly contain the operand for any opcode.
• In some cases, these are used for addressing purpose.

02/24/2023 @ Aditya Tandon


Slide: 5

Data Registers

• Hold the data and cannot be employed in the calculation of an


operand’s address.
• Example – Accumulator (AC)

02/24/2023 @ Aditya Tandon


Slide: 6

Address Registers

• These may be devoted to a particular addressing mode.


• Segment Registers – hold the address of the base of the segment.
• Index Registers – used for indexed addressing and may be auto-indexed.
• Stack Pointer (SP) – If there is user-visible stack addressing, then typically,
there is a dedicated register that points to the top of the stack.

02/24/2023 @ Aditya Tandon


Slide: 7

Condition Codes

• They are bits set by the processor hardware as the result of


operations.

02/24/2023 @ Aditya Tandon


Slide: 8

Control and Status Registers

• 4 essential registers:
• Program Counter (PC): contains the address of an instruction to be
fetched.
• Instruction Register (IR): contains the most recently fetched instruction.
• Memory Address Register (MAR): contains the address of a location in
memory.
• Memory Buffer Register (MBR): contains a word of data to be written to
memory or the word most recently read.

02/24/2023 @ Aditya Tandon


Slide: 9

Program Status Word (PSW)

• PSW contains the status information such as:


• Sign – sign bit of the result of last arithmetic operation.
• Zero – set when the result is 0.
• Carry – set if an operation resulted in a carry (addition) or borrow
(subtraction) out of high-order bit.
• Equal – set if a logical compare result is equality.
• Overflow – used to indicate arithmetic overflow.
• Interrupt Enable / Disable – used to enable or disable interrupts
• Supervisor – it’s like administrator mode – privileged access
02/24/2023 @ Aditya Tandon
Slide: 10

Lecture 6 of Unit 1 is over…

• In the next lecture, we’ll discuss


• Stack Organization

• Be Safe till then…

02/24/2023 @ Aditya Tandon

You might also like