0% found this document useful (0 votes)
90 views

TAO1221 Computer Architecture and Organization: Part 1: Discussion

This document discusses machine instructions and their components. It defines typical elements of instructions like opcode and operands. It discusses different types of locations that can hold operands like registers and memory. It also explains important instruction set design issues such as operation repertoire, data types, instruction format, registers, and addressing. The document differentiates between arithmetic and logical shifts. It describes the need for transfer of control instructions. Finally, it defines the differences between big endian and little endian formats.

Uploaded by

TAN SOO CHIN
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views

TAO1221 Computer Architecture and Organization: Part 1: Discussion

This document discusses machine instructions and their components. It defines typical elements of instructions like opcode and operands. It discusses different types of locations that can hold operands like registers and memory. It also explains important instruction set design issues such as operation repertoire, data types, instruction format, registers, and addressing. The document differentiates between arithmetic and logical shifts. It describes the need for transfer of control instructions. Finally, it defines the differences between big endian and little endian formats.

Uploaded by

TAN SOO CHIN
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

TAO1221 Lab09

TAO1221 Computer Architecture and Organization

Lab09

Part 1: Discussion

1. What are the typical elements of a machine instruction?


 Opcode – specifies the operation to be performed by the instruction.
 Operand – specifies the source and destination references (i.e. input and output
locations) of the operands that will be operated by opcode.
 A next reference – implicit information on the next instruction to be fetched.
2. What types of locations can hold source and destination operands?
Register and memory
3. List and briefly explain five important instruction set design issues.
 Operation repertoire: How many and which operations to provide, and how complex
operations should be
 Data types: The various types of data upon which operations are performed
 Instruction format: Instruction length (in bits), number of addresses, size of various
fields, and so on
 Registers: Number of processor registers that can be referenced by instructions, and
their use
 Addressing: The mode or modes by which the address of an operand is specified
4. What is the difference between an arithmetic shift and logical shift?
Logical shift Arithmetic shift
The bits of the word The word is treated as a signed integer. The sign bit is not
are shifted to the left or shifted. On a right arithmetic shift, the sign bit is replicated
right. On one end, the into the bit position to its right, other bits are shifted to the
bit shifted out is lost, right and the least significant bit is lost upon shifting. On a
while on the other end, left arithmetic shift, a sign bit is retained while all bits are
a ‘0’ is shifted in. shifted to the right and a ‘0’ shifted in into the least
significant bit position.
5. Why are transfers of control instructions needed?
 It is essential to be able to execute each instruction more than once
 Virtually all programs involve some decision making
 It helps if there are mechanisms for breaking the task up into smaller pieces that can be
worked on one at a time
6. What is the difference between big endian and little endian?
Big Endian Little Endian
The most significant byte is The most significant byte is stored
stored in the lowest numerical in the highest numerical address.
address.

Page 1 of 2
Part 2: Exercises (3 marks)

Write 8085 Assembly Language Program to find the negative value of a positive number in
memory location 8000h. Store the result in specified memory location using the given represen-
tation:

Memory Location Representation


8000h Positive number
8001h Sign-magnitude
8002h 1's complement
8003h 2's complement
8004h Biased

Test case:

Before Execution After Execution

Case 1 Case 2 Case 1 Case 2


Address Content Address Content Address Content Address Content
8000 0B 8000 45 8000 0B 8000 45
8001 XX 8001 XX 8001 8B 8001 C5
8002 XX 8002 XX 8002 F4 8002 BA
8003 XX 8003 XX 8003 F5 8003 BB
8004 XX 8004 XX 8004 74 8004 3A

Instructions:
Submit the report at the end of the class.
Marking scheme:
1. Flowchart – 1 mark
2. Assembly program – 2 marks
LDA 8000h
ORI 80h
STA 8001h
LDA 8000h
CMA
STA 8002h
ORI 01h
STA 8003h
ADI 127
STA 8004h
HLT

You might also like