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

Capital University of Science and Technology Department of Computer Science CS 2523: Computer Organization and Assembly Language (3) : Spring 2021

The document provides details about Assignment 2 for the course CS 2523: Computer Organization and Assembly Language (3) being offered in Spring 2021. The assignment focuses on basics of computer organization and assembly language, including data representation. It contains 5 tasks - the first asks students to elaborate on the 5 sub-operations of the control unit in an instruction cycle. The second deals with number systems and conversions, asking students to perform operations and state the values of carry and overflow flags, as well as convert between decimal, binary and floating point representations. It also asks students to calculate the number of bytes used by a variable based on the provided addresses.

Uploaded by

moazzam kiani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Capital University of Science and Technology Department of Computer Science CS 2523: Computer Organization and Assembly Language (3) : Spring 2021

The document provides details about Assignment 2 for the course CS 2523: Computer Organization and Assembly Language (3) being offered in Spring 2021. The assignment focuses on basics of computer organization and assembly language, including data representation. It contains 5 tasks - the first asks students to elaborate on the 5 sub-operations of the control unit in an instruction cycle. The second deals with number systems and conversions, asking students to perform operations and state the values of carry and overflow flags, as well as convert between decimal, binary and floating point representations. It also asks students to calculate the number of bytes used by a variable based on the provided addresses.

Uploaded by

moazzam kiani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Capital University of Science and Technology

Department of Computer Science

CS 2523: Computer Organization and Assembly Language (3): Spring 2021

Assignment 2: Basics of Computer Organization and Assembly Language, Data Representation


CLO 1 Define concepts in the design of microprocessor as state machine and designing its data path and its
controller.
CLO 2 Describe how the basic units of the Intel 8088 architecture work together to represent Integer Numbers,
Floating Numbers and register representation inside the microprocessor.
CLO 3 Implement assembly programs of intermediate complexity using the intel 8088 architecture. The student
should also be able to convert intermediate complexity program in high level language into assembly code.
Maximum Marks: 10 Instructor: Ms. Tayyaba Zaheer
Announcement Date: 02nd April 2021 Due Date: 09th April 2021 till 12:45 PM via MicrosoftTeams
Guidelines:
You are required to submit the assignment file or folder as
courseCode_studentReg#_studenName via MicrosoftTeams (\Assignments\COAL-
CS2523(1)\Assignment 2).
Important Note:
1) Must not copy from other students, so do it all yourself.
2) Assignment should be hand written.
Objectives:
After completion of this Assignment, you will have gained basic knowledge of computer
organization and assembly. You will be able to understand the instruction cycle. You will be able to
understand the building blocks of assembly language.
Data Representation: Topic: Number Systems, and Conversion between Decimal, Binary, Hexadecimal,
and other bases. Related Reading: Class Lectures.
Tools/Software Requirement (Optional):
1. Microsoft Word.
2. emu8086.
Important Note:
1) Must not copy from other students, so do it all yourself.
Description:
Emu8086 is an 8086-microprocessor emulator and disassembler. Emu8086 permits to assemble,
emulate and debug 8086 programs (16bit/DOS).
Tasks:
Task#1: Instruction Cycle: (02 marks)
Question: Elaborate 5 sub-operations of the control unit in the given scenario of Instruction Cycle:

Page 1 of 3
Solution:

i. Fetch:

ii. Decode:

iii. Fetch Operands:

iv. Execute:

v. Store:

Task#2: Data Representation: (08 marks)


Question 1 (02 marks): Perform the following operations and elaborate the state of Carry Flag after
each operation:

a) 0000 – 0001
b) 1111 + 0001
c) 0111 + 0001
d) 1000 – 0001

Solution:

Page 2 of 3
Question 2 (02 marks): Perform the following operations and elaborate the state of Overflow Flag
after each operation:

a) 0100 + 0001
b) 1100 + 1100
c) 1000 + 1000
d) 0100 + 0100

Solution:

Question 3 (1.5 marks): Convert -26 into 32-bit floating point representation:

Solution:

Question 4 (1.5 marks): Convert 32-bit floating point representation 1 10000011


00010000000000000000000 to decimal:

Solution:

Question 5 (01 mark): The address of var1 is 00400B20. The address of the next variable after var1 is
0040A06C. How many bytes are used by var1?

Solution:

Page 3 of 3

You might also like