Professional Documents
Culture Documents
Microprocessor and Asssembly Language Chap 1
Microprocessor and Asssembly Language Chap 1
Assembly language
Programming
and the organization of
the IBM PC
Chapter 1
Microcomputer System
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)