Basic Computer Organization
Basic Computer Organization
• The control then interprets the binary code of the instruction and proceeds
to execute it by issuing a sequence of microoperations. Every computer has its
own unique instruction set.
• The ability to store and execute instructions, the stored program concept, is
the most important property of a general-purpose computer.
• The most basic part of an instruction code is its operation part. The operation
code of an instruction is a group of bits that define such operations as add,
subtract, multiply, shift, and complement. The number of bits required for the
operation code of an instruction depends on the total number of operations
available in the computer.
• The operation code must consist of at least n bits for a given 2n (or less)
distinct operations. As an illustration, consider a computer with 64 distinct
operations, one of them being an ADD operation.
• The operation code consists of six bits, with a bit configuration 110010
assigned to the ADD operation . When this operation code is decoded in the
control unit, the computer issues control signals to read an operand from
memory and add the operand to a processor register.
• It is a binary code that tells the computer to perform a specific operation. The
control unit receives the instruction from memory and interprets the operation
code bits.
• An instruction code must therefore specify not only the operation but also the
registers or the memory words where the operands are to be found, as well as
the register or memory word where the result is to be stored.
• There are many variations for arranging the binary code of instructions, and
each computer has its own particular instruction code format. Instruction code
formats are conceived by computer designers who specify the architecture of
the computer.
•
Stored Program Organization
• The simplest way to organize a computer is to have one processor register and
an instruction code format with two parts.
• The first part specifies the operation to be performed and the second specifies
an address.
• The memory address tells the control where to find an operand in memory.
• This operand is read from memory and used as the data to be operated on
together with the data stored in the processor register.
• Figure below depicts this type of organization. Instructions are stored in one
section of memory and data in another. For a memory unit with 4096 words we
need 12 bits to specify an address since 212 = 4096. If we store each instruction
code in one 16-bit memory word, we have available four bits for the operation
code (abbreviated opcode) to specify one out of 16 possible operations, and 12
bits to specify the address of an operand.
• The control reads a 16-bit instruction from the program portion of memory. It
uses the 12-bit address part of the instruction to read a 16-bit operand from the
data portion of memory.
• They do not need an operand from memory. For these types of operations, the
second part of the instruction code (bits 0 through 11) is not needed for
specifying a memory address and can be used to specify other operations for
the computer.
•
INDIRECT ADDRESS
• It is sometimes convenient to use the address bits of an instruction
code not as an address but as the actual operand.
• The mode bit is 0 for a direct address and 1 for an indirect address. A
direct address instruction is shown in Fig. below part (b). It is placed in
address 22 in memory.
• The control finds the operand in memory at address 457 and adds it to
the content of AC. The instruction in address 35 shown in Fig. below
part (c) has a mode bit I = 1.
• Thus the effective address in the instruction of Fig. below part (b) is
457 and in the instruction of Fig below part (c) is 1350.
• The direct and indirect addressing modes are used in the computer
presented in this chapter.
• The memory word that holds the address of the operand in an indirect
address instruction is used as a pointer to an array of data. The pointer
could be placed in a processor register instead of memory as done in
commercial computers
Computer Registers
• Computer instructions are normally stored in consecutive memory
locations and are executed sequentially one at a time.
• The control reads an instruction from a specific address in memory and
executes it. It then continues by reading the next instruction in sequence
and executes it, and so on.
• This type of instruction sequencing needs a counter to calculate the
address of the next instruction after execution of the current instruction
is completed.
• It is also necessary to provide a register in the control unit for storing
the instruction code after it is read from memory. The computer needs
processor registers for manipulating data and a register for holding a
memory address. These requirements dictate the register configuration
shown in Fig. below.
• The registers are also listed in Table below together with a brief
description of their function and the number of bits that they contain.
• The memory unit has a capacity of 4096 words and each word
contains 16 bits. Twelve bits of an instruction word are needed to
specify the address of an operand.
• This leaves three bits for the operation part of the instruction and a bit
to specify a direct or indirect address. The data register (DR) holds the
operand read from memory.
•
Common Bus System
• The basic computer has eight registers, a memory unit, and a control
unit . Paths 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 outputs of each register and the inputs of the other
registers.
• A more efficient scheme for transferring information in a system with
many registers is to use a common bus.
• The connection of the registers and memory of the basic computer to
a common bus system is shown in Fig. below. The outputs of seven
registers and memory are connected to the common bus.
• The specific output that is selected for the bus lines at any given time
is determined from the binary value of the selection variables S2, S1, and
S0.
• The number along each output shows the decimal equivalent of the
required binary selection. For example, the number along the output of
DR is 3.
• The 16-bit outputs of DR are placed on the bus lines when S2S1S0 =
011 since this is the binary value of decimal 3.
• The lines from the common bus are connected to the inputs of each
register and the data inputs of the memory. The particular register
whose LD (load) input is enabled receives the data from the bus during
the next clock pulse transition.
• The memory receives the contents of the bus when its write input is
activated. The memory places its 16-bit output onto the bus when the
read input is activated and S2S1S0 = 111.
• Four registers, DR, AC, IR, and TR, have 16 bits each. Two registers,
AR
• and PC, have 12 bits each since they hold a memory address. When
the contents of AR or PC are applied to the 16-bit common bus, the four
most significant bits are set to 0's.
• When AR or PC receive information from the bus, only the 12 least
significant bits are transferred into the register. The input register INPR
and the output register OUTR have 8 bits each and communicate with
the eight least significant bits in the bus.
• The input data and output data of the memory are connected to the
common bus, but the memory address is connected to AR. Therefore,
AR must always be used to specify a memory address.
• By using a single register for the address, we eliminate the need for
an address bus that would have been needed otherwise. The content of
any register can be specified for the memory data input during a write
operation. Similarly, any register can receive the data from memory after
a read operation except AC .
• The 16 inputs of AC come from an adder and logic circuit. This circuit
has three sets of inputs. One set of 16-bit inputs come from the outputs
of AC . They are used to implement register microoperations such as
complement AC and shift AC .
• Another set of 16-bit inputs come from the data register DR. The
inputs from DR and AC are used for arithmetic and logic
rnicrooperations, such as add DR to AC or AND DR to AC.
• DR ← AC and AC ← DR
• can be executed at the same time. This can be done by placing the
content of AC on the bus (with S2S1S0 = 100), enabling the LD (load)
input of DR, transferring the content of DR through the adder and logic
circuit into AC, and enabling the LD (load) input of AC, all during the
same clock cycle.
• The two transfers occur upon the arrival of the clock pulse transition at
the end of the clock cycle.