Instruction Codes
Frequently Asked Questions
+
Ans: 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 view more..
+
Ans: An instruction code is a group of bits that instruct the computer to
perform a specific operation. It is usually divided into parts, each having its
own particular interpretation. 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, view more..
+
Ans: In this chapter we introduce a basic computer and show how its operation can
be
puter
specified with register
is defined by its internal
transfer
registers,
statements.
the limirlg
The otganization
and control
of
structure,
the comand
the set of instructions that It uses. The design of the computer is then
carried out in detall. Although the basic computer presented in this chap view more..
+
Ans: In this chapter we introduce a basic computer and show how its operation can
be
puter
specified with register
is defined by its internal
transfer
registers,
statements.
the limirlg
The otganization
and control
of
structure,
the comand
the set of instructions that It uses. The design of the computer is then
carried out in detall. Although the basic computer presented in this chapter is
very small compared to commercial computers, It has the advantage of being
simple enough so we can demonstrate the design process without too many
complications. view more..
+
Ans: It is sometimes convenient to use the address bits of an instruction code not
as an address but as the actual operand. When the second part of an instruction
code specifies an operand, the instruction is said to have an immediate
operand. view more..
+
Ans: 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. view more..
+
Ans: The memory address register (AR) has 12 bits since this is the width of
a memory address. The program counter (PC) also has 12 bits and it holds the
address of the next instruction to be read from memory after the current
instruction is executed. The PC goes through a counting sequence and causes
the computer to read sequential instructions previously stored in memory.
Instruction words are read and executed in sequence unless a branch instruction
is encountered. view more..
+
Ans: 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. view more..
+
Ans: 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 . view more..
+
Ans: The basic computer has three instruction code formats, as shown in Fig. 5-5.
Each format has 16 bits. The operation code (opcode) part of the instruction
contains three bits and the meaning of the remaining 13 bits depends on the
operation code encountered. view more..
+
Ans: Before investigating the operations performed by the instructions, let us discuss
the type of instructions that must be included in a computer. A computer
should have a set of instructions so that the user can construct machine
language programs to evaluate any function that is known to be computable.
The set of instructions are said to be complete if the computer includes a
sufficient number of instructions in each of the following categories: view more..
+
Ans: The timing for all registers in the basic computer is controlled by a master clock
generator. The clock pulses are applied to all flip-flops and registers in the
system, including the flip-flops and registers in the control unit. The clock
pulses do not change the state of a register unless the register is enabled by view more..
+
Ans: The last three waveforms in Fig. 5-7 show how SC is cleared when
D3T4 = I. Output D3 from the operation decoder becomes active at the end of
timing signal T2• When timing signal T4 becomes active, the output of the AND
gate that implements the control function D3T4 becomes active. This signal is
applied to the CLR input of SC. view more..
+
Ans: A program residing in the memory unit of the computer consists of a sequence
of instructions. The program is executed in the computer by going through a
cycle for each instruction. Each instruction cycle in turn is subdivided into a
sequence of subcycles or phases. In the basic computer each instruction cycle
consists of the following phases: view more..
+
Ans: Initially, the program counter PC is loaded with the address of the first instruction
in the program. The sequence counter SC is cleared to 0, providing a
decoded timing signal To. After each clock pulse, SC is incremented by one,
so that the timing signals go through a sequence T0, T1, T2, and so on. The
rnicrooperations for the fetch and decode phases can be specified by the
following register transfer statements. view more..
+
Ans: The timing signal that is active after the decoding is T3• During time T,, the
control unit determines the type of instruction that was just read from memory.
The flowchart of Fig. 5-9 presents an initial configuration for the instruction
cycle and shows how the control determines the instruction type after the
decoding. The three possible instruction types available in the basic computer
are specified in Fig. 5-5. view more..
+
Ans: Register-reference instructions are recognized by the control when 07 = 1 and
I = 0. These instructions use bits 0 through 11 of the instruction code to specify
one of 12 instructions. These 12 bits are available in IR(0-11). They were also
transferred to AR during time T2• view more..
+
Ans: In order to specify the rnicrooperations needed for the execution of each
instruction, it is necessary that the function that they are intended to perform
be defined precisely. Looking back to Table 5-2, where the instructions are
listed, we find that some instructions have an ambiguous description. This is
because the explanation of an instruction in words is usually lengthy, and not
enough space is available in the table for such a lengthy explanation. We will
now show that the function of the memory-reference instructions can be
defined precisely by means of register transfer notation. view more..
Recommended Posts:
- DATA TYPES
- NUMBER SYSTEM
- CONVERSION - INTRODUCTION
- OCTAL AND HEXADECIMAL NUMBER CONVERSION
- OCTAL AND HEXADECIMAL NUMBER CONVERSION -2
- Introduction to Decimal Representation
- ALPHANUMERIC REPRESENTATION
- Complements
- Complements -2
- Subtraction of Unsigned Numbers
- Subtraction of Unsigned Numbers-2
- Fixed-Point Representation
- Integer Representation
- Arithmetic Addition
- ARITHMETIC SUBTRACTION
Rating - 3/5
Advertisements