AdityaRoyKarmakar - 201001102018 (Comp Org. Assignment-2)
AdityaRoyKarmakar - 201001102018 (Comp Org. Assignment-2)
AdityaRoyKarmakar - 201001102018 (Comp Org. Assignment-2)
STUDENT ID : 201001102018
STREAM : BCA(H)
BATCH : BCA 1
SEMESTER NO. : 2
DATE : 25/07/2021
1. What is a Number System? How many types of Number
Systems are there in Computer arithmetic?
Ans: The octal number system uses eight digits: 0,1,2,3,4,5,6 and 7 with the
base of 8. The advantage of this system is that it has lesser digits when
compared to several other systems, hence, there would be fewer
computational errors. Numbers like 8 and 9 are not included in the octal
number system. Just as the binary, the octal number system is used in
minicomputers but with digits from 0 to 7.
EXAMPLE :
7268 = 7×82 + 2×81 + 6×80
= 448 + 16 + 6
= 47010
Ans:
FIXED POINT FLOATING POINT
Ans:
A simple implementation that uses Uses NOT gate along with full adder for
only NOT gates for each input each input bit.
bit.
Can be used for signed binary Can be used for signed binary
number representation but is not number representation and is most
suitable as an ambiguous suitable as an unambiguous
representation for number 0. representation for all numbers.
0 has two different representations 0 has only one representation for -0
one is -0 (e.g., 1 1111 in five-bit register), and
and the second is +0 (e.g., 0 0000 +0 (e.g., 0 0000 in the five-bit
in a five-bit register). register).
Zero (0) is considered as always
positive (sign bit is 0)
For the k bits and registers, the For the k bits and registers, the positive
positive largest number that can largest number that can be stored is
be stored is(2(k-1)-1) and the (2(k-1)-1) and the negative lowest
negative lowest number that can number that can be stored is -(2(k-1)).
be stored is -(2(k-1)-1).
Sign extension is used for converting Sign extension is used for converting
a signed integer from one size to a signed integer from one size to
another. another.
(110101)2 – (0100111)2 :
(111)2 - (01011)2 :
6. What do you understand by Computer Instruction? Define
Instruction cycle in computer organization.
Ans: Computer instructions are a set of machine language instructions that
a particular processor understands and executes. A computer performs tasks on
the basis of the instruction provided. An instruction comprises groups called
fields.
A program residing in the memory unit of a computer consists of a sequence of
instructions. These instructions are executed by the processor by going
through a cycle for each instruction.
Each computer's CPU can have different cycles based on different instruction sets,
but will be similar to the following cycle:
1. Fetch Stage: The next instruction is fetched from the memory address that
is currently stored in the program counter and stored into the instruction
register. At the end of the fetch operation, the PC points to the next
instruction that will be read at the next cycle.
2. Decode Stage: During this stage, the encoded instruction presented in the
instruction register is interpreted by the decoder.
3. Read the effective address: In the case of a memory instruction (direct or
indirect), the execution phase will be during the next clock pulse. If the
instruction has an indirect address, the effective address is read from main
memory, and any required data is fetched from main memory to be
processed and then placed into data registers (clock pulse: T3). If the
instruction is direct, nothing is done during this clock pulse. If this is an I/O
instruction or a register instruction, the operation is performed during the
clock pulse.
4. Execute Stage: The control unit of the CPU passes the decoded information
as a sequence of control signals to the relevant functional units of the CPU
to perform the actions required by the instruction, such as reading values
from registers, passing them to the ALU to perform mathematical or logic
functions on them, and writing the result back to a register. If the ALU is
involved, it sends a condition signal back to the CU. The result generated by
the operation is stored in the main memory or sent to an output device.
Based on the feedback from the ALU, the PC may be updated to a different
address from which the next instruction will be fetched.
5. Repeat Cycle
Ans:
Contains the actual operand in the The address field of the instruction
address field of the instruction code. holds the address of the operand.
Ans:
The hardwired control unit is faster This is slower than the other as
when compared to the microinstructions are used for
microprogrammed control unit as the generating signals here
required control signals are
generated with the help of hardware
1. Arithmetic Pipeline
2. Instruction Pipeline
Arithmetic Pipeline
Arithmetic pipelines are usually found in most of the computers. They are used for
floating point operations, multiplication of fixed point numbers etc. For example:
The input to the Floating Point Adder pipeline is:
X = A*2^a
Y = B*2^b
Here A and B are mantissas (significant digit of floating point numbers), while a
and b are exponents.
Instruction Pipeline
END