Faculty of Computing and
Technology Department of
Computing
Bachelor of Science in Computer Science/
Software Engineering Fundamentals of
Computer Systems – Batch 01
Assignment :
Tasks1
1. Explain the functions of all of MARIE’s registers.
Accumulator – 16 bit register that holds a conditional operator or
one operand of a two operand instruction.
Memory address register – 12 bit register that holds the memory
address of an instruction or the operand of an instruction.
Memory buffer register – A bit register that holds the data after its
retrieval from, or before its placement in memory.
Program counter- A bit register that holds the address of the next
program instruction to be executed.
Instruction register – Which holds an instruction immediately
preceding its execution.
Input register – An 8 bit register that holds data read from an input
device.
Output register- An 8 bit register that holds data that is ready for
the output device.
2. Explain how each instruction in MARIE works.
Load instruction – Moves data from memory into the CPU
Store instruction – Allows us to move data from the CPU back to
memory
Add and Subt instructions – Adds and Subtracts respectively the
data value found at address X to or from the value in the AC.
Input and Output – Allow MARIE to communicate with the outside
world.
The Halt command – Causes the current program execution to
terminate
The Skipcond instruction - Allows us to perform conditional
branching
Jump X – Load the value of X onto the PC.
3. How does a machine language differ from an assembly
language? Is the conversion one-to- one (one assembly
instruction equals one machine instruction)?
Machine language is a series of bit patterns, that are directly
executed by a computer, whereas Assembly Language is a low
level language that needs a compiler and an interpreter, which
converts that language to machine language.
Machine language is platform dependent, whereas Assembly is
platform independent.
Machine language is not human readable, but Assembly
language is a set of instructions which can be read by humans
and can be understood as well.
Machine language can be extremely time consuming, tedious
and error prone whereas Assembly language is much less
tedious and error prone than machine code
One machine language instruction corresponds to one machine
language instruction.
4. What is the significance of RTN?
RTN- Register Transfer Notation
The significance of RTN is that Symbolic notation is used to describe
the behavior of micro-operations.
5. Is a microoperation the same thing as a machine
instruction?
A micro operation is the most basic operation achievable by a
processor.
A micro instruction is a set of micro operations which are
executable simultaneously.
6. Explain the difference between register-to-register,
register-to-memory, and memory-to- memory
instructions.
Register to register - Arguments involve only registers, data
moves only within the registers, time execution is much
faster and the length of the bus connecting the registers is
the shortest.
Register to memory – Arguments involve a register and a
memory location, data moves between a register and a
location in memory time of execution is slower and the
length of the bus is
longer.hbdhbchvdgcvdwguvdgvcdgvgvdgvcgddd
Memory to memory - Arguments involve only memory
locations, data moves between two locations in memory,
time of execution is the slowest and the length of the bus is
longer.
7. Several design decisions exist with regard to instruction
sets. Name four and explain.
1. Complexity: How much efforts are required to decode an
instruction, how complex it is and what amount of time will
be required.
2. Space: While designing the total amount of space needs to be
calculated as everything comes with a cost and we need to
have a better design with as minimal cost as it could be.
3. Length: The length of instruction needs to undergo thinking
while design decision, do we need fixed length instruction or
variable length as before executing the instruction the CPU
needs to first decode the instruction size and again everything
comes with a price.
4. Number: Number of instructions needs to be thought
properly as the more number of instructions the more time
consuming and complex the design becomes.
8. What is an expanding opcode?
Expanding opcodes represent a compromise between the need for
a rich set of opcodes and the desire to have short opcodes, and
thus short instructions.
9. If a byte-addressable machine with 32-bit words stores
the hex value 98765432, indicate how this value would be
stored on a little-endian machine and on a big-endian
machine. Why does “endian-ness” matter?
00 01 10 11
Big Endian 98 76 54 32
Little 32 54 76 98
Endian
If one computer reads bytes from left to right, and another
computer reads from right to left, we're going to have issues when
both computers need to communicate. Endianness means that the
bytes in computer memory are read in a certain order, therefore
we won't have any issues if we never need to share information.
10. How do memory-memory, register-memory, and load-
store architectures differ? How are they the same?
Memory-memory architectures may have two or three
operands in memory, allowing an instruction to perform an
operation without requiring any operand to be in a register.
Intel and Motorola are examples of register-memory
architectures
Register-memory architectures require a mix, where at least
one operand is in a register and one is in memory. Digital
Equipment’s VAX architecture allows memory-memory
operations
Load-store architectures require data to be moved into
registers before any operations on those data are performed.
SPARC, MIPS, Alpha, and the PowerPC are all load-store
machines.
11. Name the seven types of data instructions and explain
each.
Data Movement - Most frequently used instructions. Data is
moved
from memory into registers, from registers to registers and from
registers to memory. Many machines provide different instructions
depending on the source and destination.
Arithmetic Operations - Arithmetic operations include those
instructions that use integers and floating-point numbers.
Boolean Logic Instructions - Boolean logic instructions perform
Boolean operations, much in the same way that arithmetic
operations work. There are typically instructions for performing
AND, NOT, OR, XOR, TEST, and COMPARE.
Bit Manipulation Instructions - Bit manipulation instructions are
used for setting and resetting individual bits within a given data
word.
Input/Output Instructions - I/O instructions vary greatly from
architecture to architecture. The input instruction
transfers data from a device or port to either memory or a specific
register. The output instruction transfers data from a
register or memory to a specific port or device.
Transfer of control - Control instructions are used to alter the
normal sequence of program execution. These instructions include
branches, skips, procedure calls, returns, and program termination.
Branching can be unconditional or conditional.
Special Purpose Instructions - Special-purpose instructions include
those used for string processing, high-level language support,
protection, flag control, word/byte conversions, cache
management, register access, address calculation, no-ops, and any
other instructions that don’t fit into the previous categories.
12. What is an address mode?
Addressing modes allow us to specify where the instruction
operands are located. An addressing mode can also specify a
constant, a register, or a location in memory.
13. Convert the following expressions from infix to reverse
Polish (postfix) notation.
a) A X B + P X Q + V X U
Input Expression Stack Positive Expression
A ( A
* (* A
B (* AB
+ (+ AB*
P (+ AB*P
* (+* AB*P
Q (+* AB*PQ
+ (++ AB*PQ*
V (++ AB*PQ*V
* (++* AB*PQ*V
U (++* AB*PQ*VU
) AB*PQ*VU*++
b) A X B + W X (U X V + Z)
Input Expression Stack Postfix Expression
A ( A
* (* A
B (* AB
+ (+ AB*
W (+ AB*W
* (+* AB*W
( (+*( AB*W
U (+*( AB*WU
* (+*(* AB*WU
V (+*(* AB*WUV
+ (+*(+ AB*WUV*
Z (+*(+ AB*WUV*Z
) (+* AB*WUV*Z+
) AB*WUV*Z+*+
(W X (A + B X (U X V)))/(U X (A + B))
Input Expression Stack Postfix Expression
( ((
W (( W
* ((* W
( ((*( W
A ((*( WA
+ ((*(+ WA
B ((*(+ WAB
* ((*(+* WAB
( ((*(+*( WAB
U ((*(+*( WABU
* ((*(+*(* WABU
V ((*(+*(* WABUV
) ((*(+* WABUV*
) ((* WABUV**+
) ( WABUV**+*
/ (/ WABUV**+*
( (/( WABUV**+*
U (/( WABUV**+*U
* (/(* WABUV**+*U
( (/(*( WABUV**+*U
A (/(*( WABUV**+*UA
+ (/(*(+ WABUV**+*UA
B (/(*(+ WABUV**+*UAB
) (/(* WABUV**+*UAB+
) (/ WABUV**+*UAB+*
) WABUV**+*UAB+*/
Convert the following expressions from reverse Polish
14.
notation to infix notation.
a) W A B Z *+ *
W*(A+B*Z)
b) U V W * Y Z + + +
U+(V*W+Y+Z)
c) X Y Z + V W Z+
15. In a computer instruction format, the instruction length
is 11 bits and the size of an address field is 4 bits. Is it
possible to have
5 2-address instructions
45 1-address instructions
32 0-address instructions
using the format? Justify your answer.
There are 2^11 possible values which can be represented with 11
bits, so there will be 2048 possible instruction codes.
The given patterns are possible if the number of combinations is
lesser than the total number of possible combinations.
5 2-address instructions
Every address has 2^4 (16) possible values, and two addresses
require 16*16vpossible combinations. 5 such instructions need
5*16*16 (1280) values in all.
1280 < 2048
Hence , 5 two-address instructions are possible.
45 1-address instructions
In the same way we can find out that we need 45*16 (720) values
to represent all the 1-address instructions.
720 < 2048
Hence , 45 one-address instructions are possible.
32 0-address instructions
The zero-address instructions need only one value each. Therefore
32 values will be needed.
32 < 2048
Hence , 32 zero-address instructions are possible.
Task 2:
Computers are categorised into four groups based on their
shape, size, and computing power. A computer's preference is
determined by various aspects, including the type of CPU and
processing speeds, memory and storage volume, quantity of
user interactions, and cost. Supercomputers are the most
powerful and require an exclusive environment to process
millions of data points.
I. Server Computers
II. Workstations
III. Laptop
IV. Portable devices including Tab and Mobile
Server Computers
A Server can be either a physical machine, a virtual machine or a
software, executing server functions. A physical server refers to a
computer known as “server computer” that runs server software.
Servers can be seen in three shapes : Tower, Blade and Rack
Mount.
Servers are usually much more expensive, but servers and Desktop
computers are not made to be comparable in that sense because
with a server you’re looking at price per level of reliability.
Server processors differ from PC processors. They are typically
designed to handle more complex workloads.
Storage Capacity is a measure of how much data a computer
system may contain. A network server with 4 1TB drives, has a
storage capacity of 4 terabytes.
Standard Server Specifications
Chipset Intel W480
CPU Intel Core i7-10700
Memory 32 GB DDR4-3200
Storage 256 GB M.2 SSD
GPU Quadro RTX 4000
Power HP 500W PSO
Significant advantages of using a server
Scalability- Multiple computers are able to be connected to
and access resources.
Reliability – Most servers have built in redundancy to help
avoid downtime even if one part fails.
Cost-It is costly but since many people can access it you often
don’t need as many software licenses.
Easier Support – Having everything in one place makes it
easier to configure and support for a large group of people.
Collaboration-Everyone can access the same information and
work together on projects.
Power-Servers aren’t always more powerful than PC’s but
there is more room to expand the high end. High end servers
allow multiple CPUs, tons of RAM slots and more storage with
higher input than a traditional PC.
Workstations
A workstation is a special computer designed for technical
or scientific applications that is intended primarily to be used by a
single user.
A workstation has advanced graphics capabilities, large storage
capacity and a powerful central processing unit.
Workstations show higher performance than mainstream personal
computers, especially in CPU, graphics, memory and multitasking.
Today’s workstations use innovations in components to lower the
weight and the cost of many dominant options, while still holding
up to constant, steady use.
Workstation components are designed and tested to give higher
performance and reliability than similar standard desktop or
laptop components, but with the advancement of technology costs
have decreased. Since many workstations are customizable so you
can choose only the needed components for your case.
Key Specifications that differentiate workstation PCs from other
laptops and desktops.
Error Correcting Code RAM
Multiple Cores
High end GPUs
Raid Storage
SSD Storage
Significant Advantages of Workstations
Better Performance – Workstations can handle more
demanding jobs, faster than traditional PCs.
More Durable-The use of higher quality components and the
process of undergoing strenuous testing make them durable
than most laptops or desktops.
Expandability-Provides the ability to upgrade to newer and
more powerful memory, hard disks and GPUs.
Laptops
A laptop is a computer that was mainly designed for portability. It is
known as a notebook.
Laptops are meant to be used on the go, so they have a battery
which allows them to operate without being plugged into a power
outlet.
Even though Laptops used to be significantly slower and less
capable than desktop computers, with the advancement of
technology laptops have been enabled to perform nearly as well as
desktops.
Laptops usually cost more than desktop computers with the same
operations because they are more complex to design and
manufacture.
Laptops usually come with displays that use thin-screen
technology, which views better at different angles.
Good Laptop Specifications
Processor : For a dependable laptop an intel i3 is fine, but an
i5 will guarantee better speeds.
Screen: It’s best not to go smaller than a 13 inch screen.
Storage space: It’s best to not accept less than 256 GB for a
SSD or less than 1 TB for a traditional hard drive.
RAM: 8GB RAM is the minimum to aim for.
Advantages of using a laptop rather than a desktop
Portability – Laptops have a compact size in comparison
with a desktop computer.
Assembly and set up- Laptops are built to be easy to use,
requiring little time to get running whereas setting up a
desktop takes a bit of extra work.
Power Usage- Smaller components mean less power is
needed to make them work therefore a laptop consumes
less power than a desktop.
Mobile Devices
A mobile device is a general term referring to any type of handheld
computer.
Mobile devices such as tablets and smartphones are powerful
enough to do the same things you can do with a desktop or laptop.
They have access to future grid resources through mobile
applications designed specifically for the devices.
A mobile device needs to be treated with a higher level of security
than the desktop or laptop, to avoid certain threats.
Mobile devices often have a lot of methods of communication.
Wireless , GPRS, Bluetooth and IrDA are often all available to
mobile phone users.
These devices are becoming more powerful day by day and
carrying more sensors, so they become good candidates to collect
environment data as well as to be a computation platform.
Characteristics of Mobile devices
Internet access through Wi-Fi or cellular data
Bluetooth Connection
A battery to power the device
A physical or onscreen keyboard
Touch screen interface
A virtual assistant
Wireless operation
Some Advantages of using a mobile device
Easy communication
Small and convenient
Can easily capture Photos and Videos
Entertainment
Calendars and Organization
Maps, Navigation and Travel
Online Banking and finance
Remote working
Compare the specifications of the following computer systems
and suggest the best usage of each device.
Submit: Online LMS (No emails are accepted).
Submissions: MS Word (doc or docx) format. (Maximum 1000
words. Include clear diagrams if necessary).
Deadline: 20th February 2023 on or before 5.00 pm.
Deadlines are not extending. However, the late submissions
are accepted with 10% deduct on each day for the late
submissions).
Note that: 50% or 100% penalty for the plagiarism.
******End of the
Assignment******