Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

COA H.W.

2
‫ﻣﺣﻣد أﯾﺎد ﻋﺑداﻟﺣﻣﯾد‬
Lecture 3:
1-

Logical, Circular and Arithmetic.

2-

3-
OverFlow: Is the change in value of the sign bit after an arithmetic shift left operation. It can be
detected by an overflow flip fop, vs.
4-

Lecture 4:

1-

The simplest way to organize a computer is to have one processor and an


instruction code with two parts.
2-
• When the second part specifies the address of operand it is called direct address.
• When the second part specifies the address of the memory word in which address
of the operand is found is called indirect address.
3-
The instruction code is divided into operation part and address part.
•An op.code (Operation Code) that specifies the operation for that instruction
•An address that specifies the registers and/or locations in memory to use for that
operation
4-
5-
Register:
• A register is a very small amount of very fast memory that is built into the CPU
(central processing unit).
•Contents can be accessed at extremely high speeds. Registers are used to store
data temporarily during the execution of a program.
ACCUMULATOR (AC): The processor register AC consists of 16-bits. It is used to hold
the results or partial results of arithmetic and logical operations. An accumulator is a
register in which intermediate arithmetic and logic results are stored.
PROGRAM COUNTER (PC): Program counter has 12-bits and it holds the address of
the next instruction to be read from memory after the current execution is
executed. The instructions are read sequentially because the program counter
automatically increments after fetching the current instruction.
OUTPUT REGISTER (OUTR): Output register has 8-bits. The output register receives
information from AC and transfer it to the output device.

Lecture 5:
1-
BUS : A wire or a collection of wires that carry some multi-bit information is known
as bus. Main purpose of bus is to transfer information form one system to another.

DESCRIPTION:
• The basic computer has eight registers (AC, PC, DR, AC, IR, TR, INPR,
OUTR), a memory unit and a control unit. Path must be provided to
transfer information from one register to another and between memory
and registers.
• The number of wires will be excessive if connections are made between
the output of each register and input of other registers a more efficient
scheme is to use a common bus.
• Thus common bus provides a path between memory unit and registers.
2-
1-Memory reference instruction: It uses 12 bits to specify the address
.Mode Bit, I=0 for Direct Addressing and 1 for Indirect Addressing.
2-Register reference instruction: In this opcode has a value 111 and 0 in
the leftmost bit position. In this operand from the memory is not needed
and operation is directly performed on the processor register specified.
Since we assumed only one Processor Register (AC), in Register reference
instruction the operand is implicit (contents of AC). For example Shift AC,
Complement AC. The remaining 12 bits of the instruction register can be
used to specify any one of the different register reference.

3-Input/output: It has a value 111 in opcode and 1 in the leftmost bit of


instruction register. The remaining 12 bits of the instruction register are
used to specify any one of the Input/output instructions.

3-
The computer system presented here has three instruction formats. Since
instruction register is of 16 bits, the opcode part has 3 bits and
interpretation of the remaining bits depends on the type of instruction.
4-

1- Arithmetic, logical, and shift instructions


•There is one arithmetic instruction , ADD, and related instructions ,
complement AC(CMA) and increment AC(INC).
•There are three logic operations : AND , complement AC(CMA), and clear
AC(CLA).The AND complement provide a NAND operation.
•2- Instructions for moving information to and from memory and
processor registers

•Moving information from memory to AC is accomplished with load


AC(LDA) instruction. Storing information from AC into memory is done
with the store AC(STA) instruction.

3-Program control instructions together with instructions that check


status condition.
4-Input & Output instructions
•The input (INP) and (OUT) instructions cause information to be
transferred between the computer and external devices.
•The branch instructions BUN, BSA, and ISZ, to gathers with the four skip
instructions, provide capabilities for program control and checking of
status conditions.

5-
0xxx 8xxx : AND – AND memory word to AC.
1xxx 9xxx : ADD – ADD memory word to AC.
7800 : CLA – Clear AC.
7200 : CMA – Complement AC.
7020 : INC – Increment AC.
F800 : INP - Input character to AC.
F400 : OUT - output character from AC.
F080 : ION – interrupt on.

You might also like