COA - Lab Manual - Even-2024
COA - Lab Manual - Even-2024
COA - Lab Manual - Even-2024
B.E. (Semester-4)
Computer Engineering
CERTIFICATE
This is to certify that Mr./Ms. Mange Deep Enrollment No. 220170107067 of B.E. Semester - 4
from Computer Engineering Department of this Institute (GTU Code: 017) has satisfactorily
completed the Practical / Tutorial work for the subject Computer Organization & Architecture
Place: ___________
Date: ___________
Page | 2
Computer Organization and Architecture (3140707) 220170107067
Preface
Main motto of any laboratory/practical/field work is for enhancing required skills as well as
creating ability amongst students to solve real time problem by developing relevant
competencies in psychomotor domain. By keeping in view, GTU has designed competency
focused outcome-based curriculum for engineering degree programs where sufficient
weightage is given to practical work. It shows importance of enhancement of skills amongst
the students and it pays attention to utilize every second of time allotted for practical amongst
students, instructors and faculty members to achieve relevant outcomes by performing the
experiments rather than having merely study type experiments. It is must for effective
implementation of competency focused outcome-based curriculum that every practical is
keenly designed to serve as a tool to develop and enhance relevant competency required by the
various industry among every student. These psychomotor skills are very difficult to develop
through traditional chalk and board content delivery method in the classroom. Accordingly,
this lab manual is designed to focus on the industry defined relevant outcomes, rather than old
practice of conducting practical to prove concept and theory.
By using this lab manual students can go through the relevant theory and procedure in advance
before the actual performance which creates an interest and students can have basic idea prior
to performance. This in turn enhances pre-determined outcomes amongst students. Each
experiment in this manual begins with competency, industry relevant skills, course outcomes as
well as practical outcomes (objectives). The students will also achieve safety and necessary
precautions to be taken while performing practical.
This manual also provides guidelines to faculty members to facilitate student centric lab
activities through each experiment by arranging and managing necessary resources in order
that the students follow the procedures with required safety and necessary precautions to
achieve the outcomes. It also gives an idea that how students will be assessed by providing
rubrics.
Computer Architecture is concerned with the way hardware components are connected
together to form a computer system. It acts as the interface between hardware and software.
Computer Architecture helps us to understand the functionalities of a system. A programmer
can view architecture in terms of instructions, addressing modes and registers. While designing
a computer system architecture is considered first. Computer Architecture deals with high-level
design issues. Architecture involves Logic (Instruction sets, Addressing modes, Data types,
Cache optimization).
Utmost care has been taken while preparing this lab manual however always there is chances of
improvement. Therefore, we welcome constructive suggestions for improvement and removal of
errors if any.
Page | 3
Computer Organization and Architecture (3140707) 220170107067
DTE’s Vision
▪ To provide globally competitive technical education.
▪ Remove geographical imbalances and inconsistencies.
▪ Develop student friendly resources with a special focus on girls’ education and support to
weaker sections.
▪ Develop programs relevant to industry and create a vibrant pool of technical
professionals.
Institute’s Vision
Institute’s Mission
Department’s Vision
Department’s Mission
Page | 4
Computer Organization and Architecture (3140707) 220170107067
▪ To develop state of the art computing facilities and academic
infrastructure.
Page | 6
Computer Organization and Architecture (3140707) 220170107067
Sr. CO CO CO CO CO
Objective(s) of Experiment
No. 1 2 3 4 5
Page | 7
Computer Organization and Architecture (3140707) 220170107067
Write following 8085 assembly language programs.
a. To add two 8-bit numbers and store result in
memory location.
b. To add five 8-bit numbers and store sum and
carry in memory location.
c. Perform addition of two 8-bit numbers and store
4. result after using DAA instruction. √
d. Perform 16-bit subtraction.
e. Perform multiplication of two 8-bit numbers
using loop.
f. Find minimum and maximum from five 8-bit
numbers stored in memory location.
g. To count the no. of 1’s in given 8-bit value.
Write following 8085 assembly language programs.
a. To add two arrays of five 8-bit values and store
result in third array.
b. To store sum of unpacked BCD numbers from
packed BCD numbers.
c. To store an ASCII value of each Hex digits.
5. d. To set an MSB of an 8-bit values if it has even √
no. of 1’s.
e. To reverse an array of ten 8-bit values using
subroutine.
f. Find factorial of given 8-bit value.
g. To perform division of 16-bit number by 8-bit
number.
6. Design ALU using Logisim. √
7. Implement Booth’s multiplication algorithm. √
Page | 8
Computer Organization and Architecture (3140707) 220170107067
The following industry relevant competencies are expected to be developed in the student by
undertaking the practical work of this laboratory.
1. Teacher should provide the guideline with demonstration of practical to the students
with all features.
2. Teacher shall explain basic concepts/theory related to the experiment to the students
before starting of each practical
3. Involve all the students in performance of each experiment.
4. Teacher is expected to share the skills and competencies to be developed in the
students and ensure that the respective skills and competencies are developed in the
students after the completion of the experimentation.
5. Teachers should give opportunity to students for hands-on experience after the
demonstration.
6. Teacher may provide additional knowledge and skills to the students even though not
covered in the manual but are expected from the students by concerned industry.
7. Give practical assignment and assess the performance of students based on task
assigned to check whether it is as per the instructions or not.
8. Teacher is expected to refer complete curriculum of the course and follow the
guidelines for implementation.
1. Students are expected to carefully listen to all the theory classes delivered by the faculty
members and understand the COs, content of the course, teaching and examination
scheme, skill set to be developed etc.
2. Students will have to perform experiments on 8085 microprocessor kit as well as on 8085
simulator.
3. Students should develop assembly language programs and execute all the programs on
8085 simulator. Students have to show output of each program in their practical file.
4. Students are instructed to submit practical list as per given sample list shown on next page.
5. Student should develop a habit of submitting the experimentation work as per the schedule
and s/he should be well prepared for the same.
Page | 9
Computer Organization and Architecture (3140707) 220170107067
Page | 10
Computer Organization and Architecture (3140707) 220170107067
Index
(Progressive Assessment Sheet)
Page | 11
Computer Organization and Architecture (3140707) 220170107067
Page | 12
Computer Organization and Architecture (3140707) 220170107067
Experiment No: 1
Date: _________________
Objectives:
Explanation:
There are a few basic components that aid the working-cycle of a computer i.e. the
Input-Process-Output Cycle and these are called as the functional components of a computer. It
needs certain input, processes that input and produces the desired output. The input unit takes the
input, the central processing unit does the processing of data and the output unit produces the
output. The memory unit holds the data and instructions during the processing.
Digital Computer: A digital computer can be defined as a programmable machine which reads
the binary data passed as instructions, processes this binary data, and displays a calculated digital
output. Therefore, digital computers are those that work on the digital data.
Page | 13
Computer Organization and Architecture (3140707) 220170107067
Input Unit:
The input unit consists of input devices that are attached to the computer. These
devices take input and convert it into binary language that the computer understands. Some
of the common input devices are keyboard, mouse, joystick, scanner etc.
Once the information is entered into the computer by the input device, the processor
processes it. The CPU is called the brain of the computer because it is the control center of
the computer. It first fetches instructions from memory and then interprets them so as to
know what is to be done. If required, data is fetched from memory or input device.
Thereafter CPU executes or performs the required computation and then either stores the
output or displays on the output device. The CPU has three main components which are
responsible for different functions – Arithmetic Logic Unit (ALU), Control Unit (CU) and
Memory registers
The ALU, as its name suggests performs mathematical calculations and takes logical
decisions. Arithmetic calculations include addition, subtraction, multiplication and division.
Logical decisions involve comparison of two data items to see which one is larger or smaller
or equal.
Control Unit:
The Control unit coordinates and controls the data flow in and out of CPU and also
controls all the operations of ALU, memory registers and also input/output units. It is also
responsible for carrying out all the instructions stored in the program. It decodes the fetched
instruction, interprets it and sends control signals to input/output devices until the required
operation is done properly by ALU and memory.
Memory Registers:
Page | 14
Computer Organization and Architecture (3140707) 220170107067
A register is a temporary unit of memory in the CPU. These are used to store the
data which is directly used by the processor. Registers can be of different sizes(16 bit, 32 bit,
64 bit and so on) and each register inside the CPU has a specific function like storing data,
storing an instruction, storing address of a location in memory etc. The user registers can be
used by an assembly language programmer for storing operands, intermediate results etc.
Accumulator (ACC) is the main register in the ALU and contains one of the operands of an
operation to be performed in the ALU.
Memory:
Memory attached to the CPU is used for storage of data and instructions and is
called internal memory. The internal memory is divided into many storage locations, each of
which can store data or instructions. Each memory location is of the same size and has an
address. With the help of the address, the computer can read any memory location easily
without having to search the entire memory. When a program is executed, its data is copied
to the internal memory and is stored in the memory till the end of the execution. The internal
memory is also called the Primary memory or Main memory. This memory is also called as
RAM, i.e. Random Access Memory. The time of access of data is independent of its
location in memory; therefore this memory is also called Random Access memory (RAM).
Output Unit:
The output unit consists of output devices that are attached with the computer. It
converts the binary data coming from CPU to human understandable form. The common
output devices are monitor, printer, plotter etc.
A computer consists of input unit that takes input, a CPU that processes the input and an
output unit that produces output. All these devices communicate with each other through a
common bus. A bus is a transmission path, made of a set of conducting wires over which data or
information in the form of electric signals is passed from one component to another in a computer.
The bus can be of three types – Address bus, Data bus and Control Bus.
Page | 15
Computer Organization and Architecture (3140707) 220170107067
The address bus carries the address location of the data or instruction. The data bus carries data
from one component to another and the control bus carries the control signals. The system bus is
the common communication path that carries signals to/from CPU, main memory and
input/output devices. The input/output devices communicate with the system bus through the
controller circuit which helps in managing various input/output devices attached to the computer.
Conclusion:
Quiz:
Suggested Reference:
Page | 16
Computer Organization and Architecture (3140707) 220170107067
Good Average Good Average Good Satisfactory Good Satisfactory Good Average
(2) (1) (2) (1) (2) (1) (2) (1) (2) (1)
Rubrics 1 2 3 4 5 Total
Marks
Page | 17
Computer Organization and Architecture (3140707) 220170107067
Experiment No: 2
Date: _________________
Objectives:
Explanation:
8085 simulator is software on which instructions are executed by writing the programs in assembly
language.
GNUSim8085 is an 8085 microprocessor simulator with following features.
Page | 18
Computer Organization and Architecture (3140707) 220170107067
2. Operations :- these operations can be specified as
Machine operations (mnemonics):- used to define operations in the form of
opcode as mention in the instruction set of microprocessor 8085.
Pseudo operations (like preprocessor in C):- these are assembly directives.
3. Operands
4. Comments
In addition, you have constants in an assembly program. Unless otherwise specified, a constant
which is always numeric is in decimal form. If appended with a character h it is assumed to be in
hexadecimal form. If a hex constant starts with an alpha-char don't forget to include the number 0
in the beginning, since that will help the assembler to differentiate between a label and a constant.
Labels:-
When given to any particular instruction/data in a program, takes the address of that instruction or
data as its value. But it has different meaning when given to EQU directive. Then it takes the
operand of EQU as its value. Labels must always be placed in the first column and must be
followed by an instruction (no empty line). Labels must be followed by a : (colon), to differentiate
it from other tokens.
Operations:-
As mentioned above the operations can be specified in two ways that are mnemonics and pseudo
operation.
Pseudo operations can be defined by using following directives:-
There are only 3 directives currently available in our assembly language.
1. DB - define byte ( 8 bits )
2. DS - define size (no. of bytes)
3. EQU - like minimalistic #define in C
DB is used to define space for an array of values specified by comma separated list. And the label
(if given to the beginning of DB) is assigned the address of the first data item.
DS is used to define the specified number of bytes to be assigned and initialize them to zero. To
access each byte you can use the + or -operator along with label.
EQU behaves similar to #define in C. But it is simple. It can be used to give names only to
numeric constants. Nesting of EQU is not allowed. You can use EQU only in operands for pseudo
ops and mnemonics.
Operands:-
Operands are specified according to the user. The register set specified in the architecture of 8085
(A, B, C, D, E, H and L) are used to access and store data. These registers are specified as
operand. In case of accessing data or storing data in the memory ‘m’ is specified as an operand
and the address of this memory location is taken from the HL pair (data in HL pair).
Page | 19
Computer Organization and Architecture (3140707) 220170107067
Software requirements: GNU Sim 8085
Operating System: Windows 7 or higher
Hardware requirements: P-IV C2D 2.9 GHZ, 320 GB HDD/2 GB RAM, Cabinet/1.44 FDD
How to start with GNU Simulator 8085
Picture 1
Step 1: Open GNU Sim 8085 above window will open. Now click on close button highlighted in
the above screen shot.
Page | 20
Computer Organization and Architecture (3140707) 220170107067
Picture 2
Step 2: Start writing the code after start: nop in load me at 10 that is at load me at 11.
Picture 3
Step 3: Click on reset and reset all the registers by clicking on reset all.
Picture 4
Page | 21
Computer Organization and Architecture (3140707) 220170107067
Picture 5
Step 5: after you execute the code mention the name your program by writing the name in the
name section as mentioned in the screen shot in picture 5 and the drive where you want to save it.
After that click on save.
Picture 6
Page | 22
Computer Organization and Architecture (3140707) 220170107067
Step 6: after this you will see the result of the instructions in the respective registers as seen in the
above picture 6.
Conclusion:
Quiz:
2) How we can set the value at memory location and I/O port?
Suggested Reference:
Good Average Good Average Good Satisfactory Good Satisfactory Good Average
(2) (1) (2) (1) (2) (1) (2) (1) (2) (1)
Rubrics 1 2 3 4 5 Total
Marks
Page | 23
Computer Organization and Architecture (3140707) 220170107067
Experiment No: 3
Date: _________________
Objectives:
Explanation:
The architecture of the 8085 microprocessor consists of several key components, including the
accumulator, registers, program counter, stack pointer, instruction register, flags register, data bus,
address bus, and control bus.
Flag Register:
It is an 8-bit register that stores either 0 or 1 depending upon which value is stored in the
accumulator. Flag Register contains 8-bit out of which 5-bits are important and the rest of 3-bits
are “don’t Care conditions”. The flag register is a dynamic register because after each operation to
check whether the result is zero, positive or negative, whether there is any overflow occurred or
not, or for comparison of two 8-bit numbers carry flag is checked. So for numerous operations to
check the contents of the accumulator and from that contents if we want to check the behavior of
given result then we can use Flag register to verify and check. So we can say that the flag register
is a status register and it is used to check the status of the current operation which is being carried
out by ALU.
Different Flags are: Carry Flag, Parity Flag, Auxiliary Carry Flag, Zero Flag, Sign Flag
Accumulator:
Accumulator is used to perform I/O, arithmetic, and logical operations. It is connected to ALU
and the internal data bus. The accumulator is the heart of the microprocessor because for all
arithmetic operations Accumulator’s 8-bit pin will always there connected with ALU and in
most-off times all the operations carried by different instructions will be stored in the accumulator
after operation performance.
Program Counter:
Program Counter holds the address value of the memory to the next instruction that is to be
executed. It is a 16-bit register.
Stack Pointer:
It works like a stack. In stack, the content of the register is stored that is later used in the program.
It is a 16-bit special register. The stack pointer is part of memory but it is part of Stack operations,
unlike random memory access. Stack pointer works in a continuous and contiguous part of the
memory. Whereas Program Counter (PC) works in random memory locations. This pointer is very
useful in stack-related operations like PUSH, POP, and nested CALL requests initiated by
Microprocessor. It reserves the address of the most recent stack entry.
Temporary Register:
It is an 8-bit register that holds data values during arithmetic and logical operations.
Page | 25
Computer Organization and Architecture (3140707) 220170107067
It is an 8-bit register that holds the instruction code that is being decoded. The instruction is
fetched from the memory.
The address bus is a 16-bit bus that is used to address memory and other devices. The address
bus is used to select the memory location or device that the microprocessor wants to access.
The control bus is a set of signals that controls the operations of the microprocessor, including
the read and write operations. The control bus includes signals such as the read signal, write
signal, interrupt signal, and reset signal. The read signal is used to read data from memory or
other devices, the write signal is used to write data to memory or other devices, the interrupt
signal is used to signal the microprocessor that an interrupt has occurred, and the reset signal is
used to reset the microprocessor to its initial state.
Conclusion:
Quiz:
3) What are the data bus, address bus and control bus?
Page | 26
Computer Organization and Architecture (3140707) 220170107067
Suggested Reference:
Good Average Good Average Good Satisfactory Good Satisfactory Good Average
(2) (1) (2) (1) (2) (1) (2) (1) (2) (1)
Rubrics 1 2 3 4 5 Total
Marks
Page | 27
Computer Organization and Architecture (3140707) 220170107067
Experiment No: 4
Date: _________________
Competency and Practical Skills: understanding of working of registers, instruction set of 8085
Objectives:
Explanation:
LDA 2050H ; Read 8-bit value from memory location 2050H in A register
MOV B, A ; Copy value of A register in B
LDA 2051H ; Read 8-bit value from memory location 2051H in A register
ADD B ; Add register B contents to A and store the sum in A register
STA 2052H ; Store the sum from A register on memory location 2052H
HLT ; Stop the execution
LXI H, 2050H ; Load 16-Bit address in HL register pair (location of first value)
MOV A, M ; Copy value from location stored in HL register pair to A
INX H ; Increment address in HL register pair (location of second value)
ADD M ; Add second value from M to A and store the sum in A register
INX H ; Increment address in HL register pair (location of result to be stored)
Page | 28
Computer Organization and Architecture (3140707) 220170107067
MOV M, A ; Store the value from A register to M (location point by HL register pair)
HLT ; Stop the execution
Output:
b. To add five 8-bit numbers and store sum and carry in memory location.
JMP START ; Jump on start label
DATA: DB 01H, 05H, 08H, 99H, ; Five 8-bit values stored named as DATA
12H
COUNT: DB 05H ; Count value is stored in COUNT
SUM: DB 00H ; Initial value of SUM is 00H
CARRY: DB 00H ; Initial value of CARRY is 00H
START: LDA COUNT ; Load COUNT value in A register
MOV C, A ; Copy COUNT value in C register from A
MVI A, 00H ; Clear value of A register (to store sum)
MVI B, 00H ; Clear value of B register (to store carry)
LXI H, DATA ; Load 16-Bit address of DATA in HL register pair
LOOP: ADD M ; Add first value to A register
JNC NEXT ;Check if Carry flag is not set, take jump on label
NEXT
INR B ; if Carry flag is set increment B register value
NEXT: INX H ;Increment address in HL register pair (for other
values)
DCR C ; Decrement C register value (to decrement count
value)
JNZ LOOP ; if Zero flag is not set, take jump on label LOOP
STA SUM ; Store sum from A register in SUM
MOV A, B ; Copy B register value to A (to store carry in
CARRY)
STA CARRY ; Store carry from A register to CARRY
HLT ; Stop the execution
Output:
c. Perform addition of two 8-bit numbers and store result after using DAA instruction.
Page | 29
Computer Organization and Architecture (3140707) 220170107067
MVI A, 05H ; Store 8-bit value in A register
MVI B, 07H ; Store 8-bit value in B register
ADD B ; Add value of B register to A, sum is in A register ( 05H + 07H = 0CH )
DAA ; Decimal Adjust Accumulator (convert value higher than 09 to BCD)
STA 2050H ; Store the result on the location 2050H
HLT ; Stop the execution
Output:
Page | 30
Computer Organization and Architecture (3140707) 220170107067
f. Find minimum and maximum from five 8-bit numbers stored in memory location.
JMP START ; Jump on start label
DATA: DB 56H, 32H, 59H, ; Five 8-bit values stored named as DATA
01H, 23H
MAX: DB 00H ; Initial value of MAX is 00H
MIN: DB 00H ; Initial value of MIN is 00H
START: MVI C, 05H ; Initial value of C register is 05H (work as counter)
LXI H, DATA ; Load 16-Bit address of DATA in HL register pair
MOV B, M ; Copy first value in B register from M (B will store Max
value)
MOV D, M ; Copy first value in D register from M (D will store Min
value)
LOOP: MOV A, M ; Copy first value in A register
CMP B ; Compare the value of A and B register
JC MINI ; Check if Carry flag is set, take a jump on label MINI
MOV B, A ; if Carry flag is not set, copy the value of A register to B
MINI: CMP D ; Compare the value of A and D register
JNC SKIP ; if Carry flag is not set, take a jump on label SKIP
MOV D, A ; if Carry flag is set, copy the value of A register to D
SKIP: INX H ; Increment address in HL register pair (for other values)
DCR C ; Decrement C register value (to decrement count value)
JNZ LOOP ; if Zero flag is not set, take jump on label LOOP
MOV A, B ; Store B register value in A (Max value)
STA MAX ; Store value from A register to MAX
MOV A, D ; Store D register value in A (Min value)
STA MIN ; Store value from A register to MIN
HLT ; Stop the execution
Output:
Conclusion:
Quiz:
Page | 32
Computer Organization and Architecture (3140707) 220170107067
Suggested Reference:
Good Average Good Average Good Satisfactory Good Satisfactory Good Average
(2) (1) (2) (1) (2) (1) (2) (1) (2) (1)
Rubrics 1 2 3 4 5 Total
Marks
Page | 33
Computer Organization and Architecture (3140707) 220170107067
Experiment No: 5
Date: _________________
a. To add two arrays of five 8-bit values and store result in third array.
b. To store sum of unpacked BCD numbers from packed BCD numbers.
c. To store an ASCII value of each Hex digits.
d. To set an MSB of an 8-bit values if it has even no. of 1’s.
e. To reverse an array of ten 8-bit values using subroutine.
f. Find factorial of given 8-bit value.
g. To perform division of 16-bit number by 8-bit number.
Competency and Practical Skills: understanding of working of registers, instruction set of 8085
Objectives:
Explanation:
a. To add two arrays of five 8-bit values and store result in third array.
JMP START ; Jump on start
DATA1: DB 01, 02, 03, 04, 05 ; First Array
DATA2: DB 06, 07, 08, 09, 10 ; Second Array
SUM: DS 5 ; Third array to store sum
COUNT: DB 05 ; Counter value
START: LXI B, DATA1 ; Load address of DATA1 in BC reg. pair
LXI H, DATA2 ; Load address of DATA2 in HL reg. pair
LXI D, SUM ; Load address of SUM in DE reg. pair
LOOP: LDAX B ; Start of LOOP; Read values from DATA1
ADD M ; Add values from DATA2
STAX D ; Store sum in SUM
INX B ; Increment location of DATA1
INX H ; Increment location of DATA2
INX D ; Increment location of SUM
LDA COUNT ; Load count in A register
DCR A ; Decrement count value in A register
STA COUNT ; Store count from A register
JNZ LOOP ; Check Zero flag, if it is not set go back to LOOP
HLT ; Stop the execution
Page | 34
Computer Organization and Architecture (3140707) 220170107067
Output:
Page | 35
Computer Organization and Architecture (3140707) 220170107067
CPI 0AH ; Compare Hex digit with 0Ah (to check Number of Leter)
JC NEXT ; If carry flag is set take jump on next
ADI 07H ; Add 07h to the value in A register
NEXT: ADI 30H ; Add 30H to the value in A register
STA ASCII ; Store the Ascii value on ASCII
HLT ; Stop the execution
Output:
Page | 36
Computer Organization and Architecture (3140707) 220170107067
Page | 37
Computer Organization and Architecture (3140707) 220170107067
STA ANS ; Store the result in ANS
HLT ; Stop the execution
MUL: MOV E, B ; Subroutine Move value of B reg to A
XRA A ; Clear value of A reg
ML: ADD D ; Add value of D reg
DCR E ; Decrement value of E reg.
JNZ ML ; If Zero flag is not set, take jump on ML
MOV D, A ; Store sum in D reg.
RET ; Return from Subroutine
Output:
Page | 38
Computer Organization and Architecture (3140707) 220170107067
Output:
Conclusion:
Quiz:
Suggested Reference:
Page | 39
Computer Organization and Architecture (3140707) 220170107067
Rubric wise marks obtained:
Good Average Good Average Good Satisfactory Good Satisfactory Good Average
(2) (1) (2) (1) (2) (1) (2) (1) (2) (1)
Rubrics 1 2 3 4 5 Total
Marks
Page | 40
Computer Organization and Architecture (3140707) 220170107067
Experiment No: 6
Date: _________________
Competency and Practical Skills: working of ALU, arithmetic and logical operations, concepts of
Digital fundamentals for logic gates, adders, etc.
Objectives:
Equipment/Instruments: Logisim
Explanation:
Page | 41
Computer Organization and Architecture (3140707) 220170107067
Page | 42
Computer Organization and Architecture (3140707) 220170107067
Conclusion:
Quiz:
Suggested Reference:
Good Average Good Average Good Satisfactory Good Satisfactory Good Average
(2) (1) (2) (1) (2) (1) (2) (1) (2) (1)
Rubrics 1 2 3 4 5 Total
Marks
Page | 43
Computer Organization and Architecture (3140707) 220170107067
Experiment No: 7
Date: _________________
Objectives:
Explanation:
Booth algorithm gives a procedure for multiplying binary integers in signed 2’s complement
representation in efficient way, i.e., less number of additions/subtractions required. It operates on
the fact that strings of 0’s in the multiplier require no addition but just shifting and a string of 1’s
in the multiplier from bit weight 2k to weight 2m can be treated as 2(k+1) to 2m. As in all
multiplication schemes, booth algorithm requires examination of the multiplier bits and shifting of
the partial product. Prior to the shifting, the multiplicand may be added to the partial product,
subtracted from the partial product, or left unchanged according to following rules:
1. The multiplicand is subtracted from the partial product upon encountering the first least
significant 1 in a string of 1’s in the multiplier
2. The multiplicand is added to the partial product upon encountering the first 0 (provided
that there was a previous ‘1’) in a string of 0’s in the multiplier.
3. The partial product does not change when the multiplier bit is identical to the previous
multiplier bit.
Page | 44
Computer Organization and Architecture (3140707) 220170107067
AC and the appended bit Qn+1 are initially cleared to 0 and the sequence SC is set to a number n
equal to the number of bits in the multiplier.
Page | 45
Computer Organization and Architecture (3140707) 220170107067
The next step is to shift right the partial product and the multiplier (including Qn+1). This is an
arithmetic shift right (ashr) operation which AC and QR to the right and leaves the sign bit in AC
unchanged.
The sequence counter is decremented and the computational loop is repeated n times.
Product of negative numbers is important, while multiplying negative numbers we need to find
2’s complement of the number to change its sign, because it’s easier to add instead of performing
binary subtraction. Product of two negative numbers is demonstrated below along with 2’s
complement.
Example – A numerical example of booth’s algorithm is shown below for n = 4. It shows the step
by step multiplication of -5 and -7.
BR = -5 = 1011,
BR'+1 = 0101 <-- 2's Complement (add 1 to the Binary value obtained after 1's complement)
Qn Qn+1 = 10
OPERATION AC QR Qn+1 SC
0 1001 0 4
AC + BR’ + 1 0101 1001 0
ASHR 0010 1100 1 3
AC + BR 1101 1100 1
ASHR 1110 1110 0 2
ASHR 1111 0111 0 1
AC + BR’ + 1 0100 0111 0
ASHR 0010 0011 1 0
Conclusion:
Page | 46
Computer Organization and Architecture (3140707) 220170107067
Quiz:
Page | 47
Computer Organization and Architecture (3140707) 220170107067
Suggested Reference:
Good Average Good Average Good Satisfactory Good Satisfactory Good Average
(2) (1) (2) (1) (2) (1) (2) (1) (2) (1)
Rubrics 1 2 3 4 5 Total
Marks
Page | 48
Computer Organization and Architecture (3140707) 220170107067
Experiment No: 8
Date: _________________
Objectives:
Explanation:
The components that form a multiprocessor system are CPUs, IOPs connected to input output
devices, and a memory unit.
The interconnection between the components can have different physical configurations,
depending on the number of transfer paths that are available
● Between the processors and memory in a shared memory system
● Among the processing elements in a loosely coupled system
There are several physical forms available for establishing an interconnection network.
Page | 49
Computer Organization and Architecture (3140707) 220170107067
● Multistage switching network
● Hypercube system
Disadvantage:
● Only one processor can communicate with the memory or another processor at any given
time.
● As a consequence, the total overall transfer rate within the system is limited by the speed
of the single path.
Multiport Memory
A multiport memory system employs separate buses between each memory module and each
CPU. The module must have internal control logic to determine which port will have access to
Page | 50
Computer Organization and Architecture (3140707) 220170107067
memory at any given time. Memory access conflicts are resolved by assigning fixed priorities to
each memory port.
Advantage:
● The high transfer rate can be achieved because of the multiple paths.
Disadvantage:
● It requires expensive memory control logic and a large number of cables and connections.
Crossbar Switch
It consists of a number of cross-points that are placed at intersections between processor buses
and memory module paths. The small square in each cross-point is a switch that determines the
path from a processor to a memory module.
Advantage:
● Supports simultaneous transfers from all memory modules.
Page | 51
Computer Organization and Architecture (3140707) 220170107067
Disadvantage:
● The hardware required to implement the switch can become quite large and complex.
Below fig. shows the functional design of a crossbar switch connected to one memory module.
Using the 2x2 switch as a building block, it is possible to build a multistage network to control the
communication between a number of sources and destinations. To see how this is done, consider
the binary tree shown in Fig. below.
Page | 52
Computer Organization and Architecture (3140707) 220170107067
One such topology is the omega switching network shown in Fig. below
Some request patterns cannot be connected simultaneously. i.e., any two sources cannot be
connected simultaneously to destination 000 and 001. In a tightly coupled multiprocessor system,
the source is a processor and the destination is a memory module. Set up the path → transfer the
address into memory → transfer the data. In a loosely coupled multiprocessor system, both the
source and destination are processing elements.
Hypercube System
The hypercube or binary n-cube multiprocessor structure is a loosely coupled system composed of
N=2n processors interconnected in an n-dimensional binary cube.
● Each processor forms a node of the cube, in effect it contains not only a CPU but also
local memory and I/O interface.
● Each processor address differs from that of each of its n neighbors by exactly one bit
position.
Fig. below shows the hypercube structure for n=1, 2, and 3.
Page | 53
Computer Organization and Architecture (3140707) 220170107067
Routing messages through an n-cube structure may take from one to n links from a source node to
a destination node.
● A routing procedure can be developed by computing the exclusive-OR of the source node
address with the destination node address.
● The message is then sent along any one of the axes that the resulting binary value will
have 1 bits corresponding to the axes on which the two nodes differ.
A representative of the hypercube architecture is the Intel iPSC computer complex.
● It consists of 128(n=7) microcomputers, each node consists of a CPU, a floating point
processor, local memory, and serial communication interface units.
Conclusion:
Quiz:
Page | 54
Computer Organization and Architecture (3140707) 220170107067
Suggested Reference:
Good Average Good Average Good Satisfactory Good Satisfactory Good Average
(2) (1) (2) (1) (2) (1) (2) (1) (2) (1)
Rubrics 1 2 3 4 5 Total
Marks
Page | 55
Computer Organization and Architecture (3140707) 220170107067
Experiment No: 9
Date: _________________
Objectives:
Theory:
// Write theory about interface of memory and I/O device with basic computer unit here…
● Memory Interfacing:
The interfacing process includes matching the memory requirements with the microprocessor
signals. Therefore, the interfacing circuit should be designed in such a way that it matches the
memory signal requirements with the microprocessor's signals.
● I/O Interfacing:
Keyboard and displays are used as communication channel with outside world. Therefore, it is
necessary that we interface keyboard and displays with the microprocessor. This is called I/O
interfacing.
Observations:
Page | 56
Computer Organization and Architecture (3140707) 220170107067
Conclusion:
Quiz:
Suggested Reference:
Good Average Good Average Good Satisfactory Good Satisfactory Good Average
(2) (1) (2) (1) (2) (1) (2) (1) (2) (1)
Rubrics 1 2 3 4 5 Total
Marks
Page | 57
Computer Organization and Architecture (3140707) 220170107067
Experiment No: 10
Date: _________________
Study about different types of computer architectures and comprehend the features and
performance parameters.
Objectives:
Explanation:
Observations:
Conclusion:
Quiz:
Page | 58
Computer Organization and Architecture (3140707) 220170107067
Suggested Reference:
Good Average Good Average Good Satisfactory Good Satisfactory Good Average
(2) (1) (2) (1) (2) (1) (2) (1) (2) (1)
Rubrics 1 2 3 4 5 Total
Marks
Page | 59