Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

A solution manual to

Assembly language
Programming
and the organization of
the IBM PC

Chapter 1
Microcomputer System

BY:- Ytha Yu & Charles Marut


prepared by :
Warda Aziz
Wardaaziz555@gmail.com
Special thanks to my instructor:
MISS SANYA QURESHI
Question 1:
Suppose memory bytes 0-4 have the following contents:
address contents
0 01101010
1 11011101
2 00010001
3 11111111
4 01010101
A) assuming that a word is 2 bytes, what are the contents of
a) The memory word at address 2?
b) The memory word at address 3?
c) The memory word whose high byte is the byte at address 2?
Ans:
a) 00010001 11111111
b) 11111111 01010101
c) 00010001 11011101
B) What is
a) bit 7 of byte 2?
b) Bit 0 of word 3?
c) Bit 4 of byte 2?
d) Bit 11 of word 2?
Ans:
a) 0
b) 1
c) 1
d) 1
Question 2:
A nibble is four bits. Each byte is composed of a high nibble and a low nibble ,
similar to the high and low bytes of a word, using the data in Q1 , give the
contents of
A) the low nibble of byte 1
B) the high nibble of byte 4
Ans:
A)1101
B)0101

Question 3:
The two kinds of memory are ROM and RAM. Which kind of memory
A) holds a user’s program?
B) Holds the program used to start the machine?
C) Can be changed by the user?
D) Retains its contents, even when the power is turned off?
Ans:
A) RAM
B) ROM
C) RAM
D) ROM

Question 4:
What is the function of
A) the microprocessor?
B) The buses
Ans:
Microprocessor:
A microprocessor is a processing unit fabricated on a single circuit chip(CPU). It controls
all functions of the CPU, or other digital devices. The microprocessor functions as an artificial
brain.
Buses:
A bus is a set of wires or connections connecting the major components (CPU, memory and I/O
ports) of a computer system. It is used to transfer the data between different units and controls the
execution of program

Question 5:
The two parts of the microprocessor are the EU and the BIU;
What is the function of
A) EU
B) BIU
Ans:
EU(Execution Unit):
EU(execution unit) is used to execute the instructions as it contains a circuit called ALU.
BIU(Bus Interface Unit):
The BIU facilitates communication between the EU and the memory or I/O circuits. Another
operation of BIU is to speed up the processor.

QUESTION 6:
In the microprocessor , what is the function of
A) IP
B) ALU
Ans:
IP(Instruction Pre-fetch):
The purpose of IP is to speed up the processor as it keeps the address of the next instruction to
be executed.
ALU(Arithmetic and Logic Unit):
The ALU is responsible to perform arithmetic (+, -, *, /) and logic (AND, OR, NOT) operations.

Question 7:
A) What are the I/O ports used for?
B) How are they different from memory locations?
Ans:
A) I/O ports function as a transfer point between CPU and I/O devices.
B) I/O ports are different from memory locations as the address of I/O ports are known as I/O
addresses and can only be used in input and output instructions

Question 8:
What is the maximum length (in bytes ) of an instruction for the 8086 based IBM
PC?
Ans:
The x86 family (8086) is a 16 bit microprocessor that can operate on 16 bits(2 bytes) of data at a
time.
Instruction set(8086) >>x86-16

Question 9:
Consider a machine language instruction that moves a copy of the contents of
register AX in the CPU to a memory word. What happens during
A) fetch cycle
B) Execution cycle
Ans:
;MOV mem, AX
Fetch cycle:
 Fetch the instruction(contents of AX) from the memory
 Decode into machine code
Execution cycle:
 Perform the operation (movement of AX) on the data
 Store the result in memory

Question 10:
Give :
A)three advantages of high level language programming
B)three advantages of assembly language programming
Ans:
High level language:
 Close to natural language
 High level programs can be executed on any machine that has a compiler for that language
 Easier to debug
Assembly language:
 Efficient; produces a faster and shorter machine language program.
 Reading and writing to specific memory locations and I/O ports can be done easily in
assembly language but may be impossible at higher level.
 It can give you a better understanding of the processor(but only at instruction level)

You might also like