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

CSC 205 Assignment

Uploaded by

moshoodfawaz5
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

CSC 205 Assignment

Uploaded by

moshoodfawaz5
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CSC 205 (ASSEMBLY LANGUAGE PROGRAMMING) ASSIGNMENT

INSTRUCTION: SOLVE THE FOLLOWING QUESTIONS


1. (a) (i) What is an assembly language?
(ii) Describe the general format of an assembly language instruction.
(iii) Briefly explain four advantages of assembly language.

(b) (i) Describe four problems of machine language that led to the development of assembly language.
(ii) Briefly explain three major types of language translator in computing.

2. (a) (i) What are registers in the Central Processing Unit (CPU)?
(ii) Briefly describe functions of five important registers in the CPU.

(b) (i) Describe five differences between the Complex Instruction Set Computer (CISC) and the
Reduced Instruction Set Computer (RISC).
(ii) Briefly explicate the two types of primary memory.

3. (a) Answer the following:


(i) How many nibbles are 32 bits?
(ii) How many bytes are 64 bits?
(iii) How many kilobytes is 1 gigabyte?
(iv) If an address line for a given computer has 16 lines, then what is the maximum amount of
memory it can access?
(v) How many bytes are 24 kilobytes?
(vi) Intel data representation format is based on …………………………. endian.
(vii) The 2’s complement of 10010102 is …………………………….
(viii) The 2’s complement of 6A3D16 is ………………………………

(b) If DS = 3499H and the offset = 2500H, find:


(i) The physical address
(ii) The logical address of the data being fetched
(iii) The lower range of the data segment
(iv) The upper range of the data segment

4. (a) (i) What is a system bus?


(ii) ………………………… bus is unidirectional while ………………. bus is bidirectional.
(iii) What is pipelining, and how does it make the CPU execute faster?

(b) (i) Name three features of 8086 microprocessor that were improvements over 8080/8085
microprocessor.
(ii) What is the major difference between 8088 and 8086 microprocessors?
(iii) Which of the two microprocessors in 4(b) (ii) above has the larger queue? Hence, state the size
of the queue for each of the microprocessors.

1
5. (a) Perform the indicated operations on the following numbers:
(i) 7C416 + 3BE16 in hexadecimal
(ii) 59F16 – 2B816 in hexadecimal
(iii) 23D916 + 94BE16 in hexadecimal
(iv) 11112 + 10102 in binary
(v) 1110112 + 1010112 in binary
(vi) 6A216 + 49A16 in hexadecimal
(vii) 9FF2516 – 4DD9916 in hexadecimal
(viii) 106616 + ABCD16 in hexadecimal

(b) List all of the following 8086 registers:


(i) 16-bit general-purpose registers
(ii) Pointer registers
(iii) Index registers
(iv) Segment registers

6. (a) Give reasons why each of the following instructions cannot be coded in 8088/86 assembly
language. Assume that all numbers are in hexadecimal:
(i) MOV CS, 23AB
(ii) MOV BL, AX
(iii) MOV AL, 3CB5
(iv) MOV AX, 36DE5

(b) (i) Write assembly language instructions to add the values 16H and ABH. Place the result in
register AX.
(ii) If AX = 24F6H and the instruction “MOV [1450], AX” were executed, what would be the
contents of the memory locations at offsets 1450 and 1451?
(iii) Assume that DS = 1120, SI = 2498, and AX = 17FE. Show the contents of memory locations
after the execution of the following instruction:
MOV [SI], AX
7. (a) (i) What is a stack and why is it needed in the computer system?
(ii) When data is pushed onto the stack, the stack pointer is ………………........., but when data is
popped off the stack, the stack pointer is ……………………..
(iii) Assume that SP = 1236, AX = 24B6, BX = 85C2, and DX = 5F93, show the contents of the
stack as each of the following instructions is executed.
PUSH AX
PUSH BX
PUSH DX

(b) Using 2’s complement method, perform:


(i) 1610 – 2510
(ii) 1910 – 1310
(iii) 2710 – 1110
(iv) 1310 – 1910

2
8. (a) State the functions of each bit of the 8086 microprocessor flag register listed below:
(i) Carry flag (CF)
(ii) Parity flag (PF)
(iii) Auxiliary Carry flag (AF)
(iv) Zero flag (ZF)

(b) Find the status of the CF, PF, AF, ZF and SF bits of the 8086 microprocessor flag register for the
following operations:
(i) MOV BH, 38H
ADD BH, 2FH

(ii) MOV BX, 94C2H


ADD BX, 323EH

9. Perform the following conversions:


(i) Convert 6DF16 to decimal
(ii) Convert 0.37510 to binary
(iii) Convert 11101012 to decimal
(iv) Convert 438 to binary
(v) Convert 3610 to binary
(vi) Convert 110011.112 to decimal
(vii) Convert A616 to binary
(viii) Convert 1638 to decimal
(ix) Convert 147410 to hexadecimal
(x) Convert 110100112 to hexadecimal
(xi) Convert 5810 to hexadecimal
(xii) Convert 4210 to binary
(xii) Convert 0.562510 to binary
(xiv) Convert 111011.102 to decimal
(xv) Convert FEC16 to decimal

10. (a) Find the physical address of the memory location and its contents after the execution of the
following, assuming that DS = 1512H.
MOV AL, 99H
MOV [3518], AL

(b) (i) State the difference between the following two instructions:
ADD AX, BX
ADD AX, [BX]
(ii) Briefly explain seven types of 8086 microprocessor addressing modes.

11. (a) Assume that DS = 4500, SS = 2000, BX = 2100, SI = 1486, BP = 7814, and AX = 2512.
Show the exact physical memory location where AX is stored in each of the following.
All values are in hexadecimal.
(i) MOV [BP] + 12, AX
(ii) MOV [SI] + 10, AX
(iii) MOV [BX] + 20, AX

(b) Give 8086 microprocessor’s addressing mode for each of the following:
(i) MOV AX, 32DEH
(ii) MOV AL, [BX]
(iii) MOV DX, [BP + DI + 4]
(iv) MOV AX, DX
(v) MOV CX, [BX + 10]
(vi) MOV DL, [2400]
(vii) MOV BL, [SI + 10]
3

You might also like