Arid No: 19-Arid-5210
Topic: Late Assignments.
Assignment No: 01.
Basic architecture of a computer system.
A computer system is basically a machine that simplifies complicated tasks. It should maximize
performance and reduce costs as well as power [Link] different components in the
Computer System Architecture are Input Unit, Output Unit, Storage Unit, Arithmetic Logic Unit, Control
Unit etc.
Input Unit
The input unit provides data to the computer system from the outside. So, basically it links the external
environment with the computer. It takes data from the input devices, converts it into machine language
and then loads it into the computer system. Keyboard, mouse etc. are the most commonly used input
devices.
Output Unit
The output unit provides the results of computer process to the users i.e it links the computer with the
external environment. Most of the output data is the form of audio or video. The different output
devices are monitors, printers, speakers, headphones etc.
Storage Unit
Storage unit contains many computer components that are used to store data. It is traditionally divided
into primary storage and secondary [Link] storage is also known as the main memory and is
the memory directly accessible by the CPU. Secondary or external storage is not directly accessible by
the CPU. The data from secondary storage needs to be brought into the primary storage before the CPU
can use it. Secondary storage contains a large amount of data permanently.
Arithmetic Logic Unit
All the calculations related to the computer system are performed by the arithmetic logic unit. It can
perform operations like addition, subtraction, multiplication, division etc. The control unit transfers data
from storage unit to arithmetic logic unit when calculations need to be performed. The arithmetic logic
unit and the control unit together form the central processing unit.
Control Unit
This unit controls all the other units of the computer system and so is known as its central nervous
system. It transfers data throughout the computer as required including from storage unit to central
processing unit and vice versa. The control unit also dictates how the memory, input output devices,
arithmetic logic unit etc. should behave.
Assignment No 02:
Square and Cube of a number:
[org 0x0100]
mov ax, data
mov ds, ax
mov ah, 00
mov al, a
mul a
mov bl,al
mul word ptr a
mov bh, al
mov ax, 4ch
int 21h
Assignment No: 04.
(1)
[org 0x0100]
call set_
call clear_
call invert_
mov ax,0x4c00
int 0x21
num : dw 30
set_:
mov ax,[num]
or ax,0x0f
ret
clear_:
mov ax,[num]
and ax,0x0f
ret
invert_:
mov al,[num]
not al
ret
(2)
(i)
[org 0x0100]
jmp start
daat : dw 0
start:
call square_series
mov ax,0x4c00
int 0x21
square_series:
mov cx,1q
mov di,0
mov bx,2
looing:
mov ax,cx
mov bx,cx
mul bx
mov word[daat+di],ax
add di,2
add cx,1
cmp cx,5
jnz looking
ret
(ii)
[org 0x0100]
jmp start
daat : dw 0
start:
call cube
mov ax,0x4c00
int 0x21
cube:
mov cx,1
mov di,0
mov bx,2
looing:
mov ax,cx
mov bx,cx
mul bx
mul bx
mov word[daat+di],ax
add di,2
add cx,1
cmp cx,5
jnz looing
ret