0% found this document useful (0 votes)
68 views3 pages

Tutorial # 1 Solution

This document provides solutions to questions about computer architecture and assembly language. It defines key terms like assembly language, machine language, instruction set architecture, and two's complement representation. It also solves problems involving binary conversions between decimal, binary, hexadecimal and signed/unsigned numbers. Register sizes, memory addressing, and arithmetic operations are discussed. Common components of computer systems like CPU, memory hierarchy and cache are also introduced.

Uploaded by

nadjlaa hanane98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views3 pages

Tutorial # 1 Solution

This document provides solutions to questions about computer architecture and assembly language. It defines key terms like assembly language, machine language, instruction set architecture, and two's complement representation. It also solves problems involving binary conversions between decimal, binary, hexadecimal and signed/unsigned numbers. Register sizes, memory addressing, and arithmetic operations are discussed. Common components of computer systems like CPU, memory hierarchy and cache are also introduced.

Uploaded by

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

Computer Architecture & Assembly Language

Tutorial # 1 Solution

Q1. Fill the blanks in the following questions:


1. There is a one-to-one correspondence between assembly language and machine language.

2. Advantages of programming in high-level language are: program development is faster,


program maintenance is easier and programs are portable.

3. Advantages of programming in assembly language are: accessibility to system hardware


and space and time efficiency.

4. The processor consists of two main units: data path unit and control unit.

5. Given an address bus of 20 bits and data bus of 16 bits, the maximum memory size that can
be interfaced with the CPU is 2 =1 M bytes and the maximum number of bytes that can be
20

read in a single read/write cycle is 16/8=2 bytes.

6. Dynamic RAM is slower than static RAM but is denser and cheaper.

7. The need for a memory hierarchy is due to widening speed gap between CPU and main
memory.

8. Cache memory is faster than random access memory (RAM) but slower than registers.
9. Instruction Pointer (IP) or Program Counter (PC) is a register that holds the address of
the next instruction to be fetched from memory.

10. The instruction set architecture is considered as an interface between software and
hardware and consists of instruction set, programmer accessible registers and main
memory.

11. Operating system is a program that manages the resources of a computer for the benefit of
the programs that run on that machine.

12. Compiler is program that translates from high-level languages to assembly language.

13. Very Large Scale Integration (VLSI) is a technology in which a single chip contains
hundreds of thousands to millions of transistors.

Q2. Consider an 8-bit register that has the binary number 10010110. Determine the decimal value of
the number if it represents:
(i) An unsigned number.

128+16+4+2=150
(ii) A signed number in sign-magnitude representation.

=-(16+4+2)=-22
(iii) A signed number in 1’s complement representation.

1's complement of 10010110 = 01101001=(64+32+8+1)=+105


Thus, 10010110 represents -105
(iv) A signed number in 2’s complement representation.

2's complement of 10010110 = 01101010=(64+32+8+2)=+106


Thus, 10010110 represents -106

Q3. Perform the following arithmetic operations assuming that numbers are represented using 8- bit
2’s complement representation. Indicate in your answer when an overflow occurs.
(i) FF + FF

= FE
There is no overflow as we are adding two negative numbers and we got a negative
number.
(ii) FE – 80

= FE + 2's comp. of 80 = FE + 80 = 7E

There is overflow as we are adding two negative numbers and we got a positive.

Q4. Fill the blanks in the following questions:


(i) Assuming unsigned number representation, (F1)16 represents the decimal number =
15x16+1=241.

(ii) The decimal number 1020 is represented in binary as 1111111100.

(iii) The binary number 01100011 represents character c, and uses an even parity bit. Note
that the ASCII code of character A is 41H and that of character a is 61H.

(iv) Assuming 4-bit 2`s complement representation, the smallest (negative) number is 1000
in binary and -8 in decimal and the largest (positive) number is 0111 in binary and +7
in decimal.

You might also like