Unit 1
Unit 1
INTRODUCTION TO SUBJECT
SUBJECT NAME: COMPUTER ORGANIZATION & ARCHITECTURE
SUBJECT CODE: 3140707
CREDIT : 4 { 10 – UNIT , 8 PRACTICALS }
UNIT 1:
COMPUTER DATA REPRESENTATION
• Computer Organization:
COMPUTER
ARCHITECTURE
R1
STORAGE
ADDRER HSA
R2
Character set
Character sets can of following types in computers:
Alphabetic characters- It consists of alphabet characters A-Z or a-z.
Numeric characters- It consists of digits from 0 to 9.
Special characters- Special symbols are +, *, /, -, ., <, >, =, @, %, #, etc.
n Minimum Maximum
8 0 (28)-1 (=255)
16 0 (216)-1 (=65,535)
32 0 (232)-1 (=4,294,967,295) (9+ digits)
64 0 (264)-1 (=18,446,744,073,709,551,615) (19+ digits)
• Sign bit -The fixed-point numbers in binary uses a sign bit. A positive number has a
sign bit 0, while a negative number has a sign bit 1.
• Integral Part – The integral part is of different lengths at different places. It depends
on the register’s size, like in an 8-bit register, integral part is 4 bits.
• Fractional part – Fractional part is also of different lengths at different places. It
depends on the register’s size, like in an 8-bit register, integral part is of 3 bits.
8 bits = 1Sign bit + 4 bits(integral) + 3bits (fractional part)
16 bits = 1Sign bit + 9 bits(integral) +6 bits (fractional part)
32 bits = 1Sign bit + 15 bits(integral) + 9 bits (fractional part)
Prepared by: Pooja Rathod
Floating-point representation
• To discard the limitation of fixed-point notation, floating-point number representation was
developed by scientists. The computer system uses floating-point numbers representation to
convert input data into binary form. The binary form number is converted into ‘scientific
notation,’ and then this scientific notation is converted into floating-point representation.
• The floating-point notation has two types of notation
1. Scientific notation
2. Normalized notation
• Sign bit -The fixed-point numbers in binary uses a sign bit. A positive number has a sign bit
0, while a negative number has a sign bit 1. In floating-point representation, sign of a
number always depends on mantissa, not on exponent. Hence sign bit in the format is
always for mantissa and not for the exponent.
• Mantissa Part –Mantissa part is of different length at a different place. It depends on the
size of the register like in 16-bit register; mantissa part is of 8 bits.
• Exponent part – Exponent is the power of the number. It depends on the register’s size;
like in the 16-bit register, exponent part is 7 bits. Excess 16,64,128, 512 are used to store
exponent in this format.
1101.101 * 2101
7 6 5 4 3 2 1 0
Register R Showing individual bits
15 0 15 8 7 0
PC (H) PC (L)
Numbering of bits Divided into two parts
• The data register holds the operand read from the memory.
• The accumulator is a general-purpose register need for processing.
• The instruction register holds the read memory.
• The temporary data used while processing is stored in the temporary register.
• The address register holds the address of the instruction that is to be implemented next
from the memory.
• The Program Counter (PC) controls the sequence of instructions to be read. In case a
branch instruction is detected, the sequential execution does not arise. A branch execution
calls for a transfer to an instruction that is not in sequence with the instructions in the PC.
• The input register (INPR) and output register (OUTPR) are the registers used for the I/O
operations. The INPR receives an 8-bit character from the input device. It is similar to the
OUTPR.
Prepared by: Pooja Rathod
Register Transfer :
The information transformed from one register to another register is
represented in symbolic form by replacement operator is called Register
Transfer.
The symbolic notation used to describe the micro-operation transfers amongst
registers is called Register transfer language.
The term Register Transfer refers to the availability of hardware logic circuits
that can perform a given micro-operation and transfer the result of the
operation to the same or another register.
For example:
• Data Transfer from one register to another register is represented in symbolic
form by means of replacement operator. For instance, the following statement
denotes a transfer of the data of register R1 into register R2.
R2 ← R1
Prepared by: Pooja Rathod
Micro-Operation
• “The operations executed on data stored in registers are called micro-
operations. A micro-operation is an elementary operation performed on the
information stored in one or more registers.”
• Example: Shift, count, clear and load.
• micro-operations (also known as micro-ops) are the functional or atomic,
operations of a processor.
• These are low level instructions used in some designs to implement complex
machine instructions.
D2 C2 B2 A2 D1 C1 B1 A1 D0 C0 B0 A0
D2 D1 D0 C2 C1 C0 B2 B1 B0 A2 A1 A0
3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0
Register D Register C Register B Register A
Output Y = A if C =1
Normal Input A
High-impedance if C = 0
Control Input C
B0
C0
D0
0
1
S1
Select 1
0 2x4
S0 Decoder 1
2
Enable
E
3
B3 A3 B2 A2 B1 A1 B0 A0
1 0
1 0 1 0 1 0 1 0 M
B 3’ B 3 B 2’ B 2 B 1’ B 1 B 0’ B 0
C3 C2 C1 C0
FA FA FA FA
C4 S3 S2 S1 S0
x y x y x y x y
C 0 0 1
R1 1 1 0 1 HA HA HA HA
+ 1
Sum 1 1 1 0 C S C S C S C S
C4 S3 S2 S1 S0
0 1 1 1 0
0 0
Cin A0 B0 A1 B1 A2 B2 A3 B3
1 S1 S0 1
Prepared by: Pooja Rathod
4-bit Arithmetic Circuit
• 4 full-adder circuits that constitute the 4-bit adder and four multiplexers for choosing
different operations.
• There are two 4-bit inputs A and B.
• The four inputs from A go directly to the X inputs of the binary adder. Each of the four
inputs from B is connected to the data inputs of the multiplexers. The multiplexer’s data
inputs also receive the complement of B.
• The other two data inputs are connected to logic-0 and logic-1.
• Logic-0 is a fixed voltage value (0 volts for TTL integrated circuits)
• Logic-1 signal can be generated through an inverter whose input is 0.
• The four multiplexers are controlled by two selection inputs, S1 and S0.
• The input carry Cin goes to the carry input of the FA in the least significant position. The
other carries are connected from one stage to the next.
• 4-bit output D0…D3
Prepared by: Pooja Rathod
4-bit Arithmetic Circuit
• When S1S0 = 00
• If Cin = 0 then D = A + B; Add
• If Cin = 1 then D = A + B + 1; Add with carry
• When S1S0 = 01
• If Cin = 0 then D = A + ; Subtract with borrow
• If Cin = 1 then D = A + + 1; A + 2’s complement of B i.e. A - B
• When S1S0 = 10
• Input B is neglected and all 0’s are inserted to Y inputs
D = A + 0 + Cin
• If Cin = 0 then D = A; Transfer A
• If Cin = 1 then D = A + 1; Increment A
• When S1S0 = 11
• Input B is neglected and all 1’s are inserted to Y inputs
D = A - 1 + Cin
• If Cin = 0 then D = A - 1; 2’s compliment
• If Cin = 1 then D = A; Transfer A
Prepared by: Pooja Rathod
Logic Microoperations
• Logic microoperations specify binary operations for strings of bits stored in
registers.
• These operations consider each bit of the register separately and treat them
as binary variables.
• Logic micro-operations are working of few logic gates.
• Logic gates are used to implement the Boolean function, and gates are the
circuits that can allow or cannot allow current to pass through them.
• If current passes, it gives value 1, otherwise it gives value 0.
Complement A
Transfer B
Exclusive-OR
NAND
OR
Set to all 1’s
S1
S0 S1 S0 Output Operation
Ai 0 0 AND
0
Bi
0 1 OR
4x1
1 Ei
MUX 1 0 XOR
2
1 1 Complement
R1 1 1 0 1 R1 1 1 0 1
R1 1 0 1 0 R1 0 1 1 0
R1 1 1 0 1 R1 1 1 0 1
R1 1 0 1 1 R1 1 1 1 0
R1 1 1 0 1 R1 1 1 0 1
R1 1 0 1 0 R1 1 1 1 0
S
0 MUX
0 H3
IL 1
0 4x1 Fi
Ci +1 1 MUX
2
3
One stage of Ei
Bi logic circuit
Ai
Ai-1 SHR
Ai+1 SHL