Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Name: Abdul-Hamid Arowona

Matric Number:
Department: Electrical and Electrical Engineering
Course: GET 211: Computer and Software Engineering

Lab 1: Basics of Computer Organization


The objective was to understand the fundamental components of computer organization, to
see and understand the functions of each component.

Exercise 1: Identify computer components


A computer has many different parts that have different functions. Some of them are CPU,
Motherboard, GPU, Memory, and storage.

Central Processing Unit (CPU)


The central processing unit (CPU) – commonly referred to as the processor – is the ‘brain’ of
your computer. Its electronic circuitry executes instructions of a computer program, such as
arithmetic, logic, controlling, and input/output (I/O) operations. This role contrasts with that
of external components, such as main memory and I/O circuitry, and specialized
coprocessors such as graphics processing units (GPUs).
Motherboard
A motherboard is the main printed circuit board (PCB) in general-purpose computers and
other expandable systems. It holds and allows communication between many of the crucial
electronic components of a system, such as the central processing unit (CPU) and memory,
and provides connectors for other peripherals. It usually
contains significant sub-systems, such as the central
processor, the chipset’s input/output and memory
controllers, interface connectors, and other
components integrated for general use.

Memory
Computer memory stores information, such as data and
programs for immediate use in the computer. The term
memory is often synonymous with the term primary
storage or main memory. It operates at a high speed
compared to storage which is slower but less expensive
and higher in capacity. Besides storing opened
programs, computer memory serves as disk cache and
write buffer to improve both reading and writing performance.

Storage
A storage device provides the memory for installing programs
and saving files. Unlike RAM, a storage device’s content is
secured in non-volatile memory, meaning that data is saved
permanently inside its memory bank, preserving them even
after you turn off the PC (unless manually deleted or
uninstalled).

Graphics Processing Unit (GPU)


A graphics processing unit (GPU) is a specialized electronic circuit
initially designed to accelerate computer graphics and image
processing (either on a video card or embedded on
motherboards, mobile phones, personal computers,
workstations, and game consoles).
I/O Devices

In computing, input/output is the communication between an information processing


system, such as a computer, and the outside world, possibly a human or another information
processing system. Inputs are the signals or data received by the system and outputs are the
signals or data sent from it.

Exercise 2: Memory Hierarchy Exploration


The concept of memory hierarchy is based on the principle of locality, which states that a
program is likely to access a small portion of its address space repeatedly. Memory Hierarchy
can be simply illustrated as the organization of the memory for saving the access time. In the
memory hierarchy, from top to bottom, there are: processor registers, cache, main memory,
and secondary memory. The order goes from faster, smaller capacity, and higher cost to
slower, higher capacity, and lower cost. Data moves from the main memory to cache .
Journey of Text Through the Memory Hierarchy
When text is loaded into the memory hierarchy, it first goes to the CPU registers, which are
small, high-speed memory units located in the CPU. If the text is not found in the registers, it
is then searched for in cache memory, which is a small, fast memory unit located close to
the CPU. If the text is not found in cache memory, it is then searched for in main memory,
which is the primary memory of a computer system. Main memory has a larger storage
capacity than cache memory but is slower. If the text is still not found in main memory, it is
then searched for in secondary storage, such as hard disk drives (HDD) and solid-state drives
(SSD), which are non-volatile memory units that have a larger storage capacity than main
memory.
Importance of Memory Hierarchy
Memory hierarchy is critical because it helps to bridge the gap between the speed of the
processor and the speed of the memory. Without memory hierarchy, the processor would
have to wait for data to be fetched from memory, which would lead to significant
performance bottlenecks. Memory hierarchy allows the processor to access the most
frequently used data much faster, reducing the amount of time it has to wait for data to be
fetched.
If a computer's central processer (CPU) had to only use a secondary storage device,
computers would become much slower. In general, the more memory (primary memory) a
computing device has, the less frequently the computer must access instructions and data
from slower (secondary) forms of storage.
Lab 2: Boolean Algebra
The objective of this lab was to learn about Boolean operators and their functions.

Exercise 3: Truth Tables and Logic Gates


Logic Gates
A logic gate is an idealized or physical device that
performs a Boolean function, a logical operation
performed on one or more binary inputs that
produces a single binary output. There are seven
basic logic gates: AND, OR, XOR, NOT, NAND, NOR,
and XNOR.

Truth Tables
A truth table is a mathematical table used in logic which sets out the functional values of
logical expressions on each of their functional arguments, that is, for each combination of
values taken by their logical variables. All logic gates have two inputs except the NOT gate,
which has only one input. When drawing a truth table, the binary values 0 and 1 are used.
Every possible combination depends on the number of inputs.
AND

Input 1 Input 2 Output


1 0 0
1 1 1
0 1 0
0 0 0
OR

Input 1 Input 2 Output


1 0 1
1 1 1
0 1 1
0 0 0
NOT

Input Output
1 0
0 1

Implementing the Truth Tables using Logic Gates:


AND

OR

NOT

They all match their truth tables.


Lab 3: Floating-Point Arithmetic and Non-Numeric Information Representation
The objective was to explore the representation of real numbers and non-numeric data.
Exercise 4: Floating-Point Arithmetic
Floating point arithmetic is a method of representing and manipulating real numbers in a
computer system. It allows for numbers that have fractional parts to be stored and operated
on with a certain degree of accuracy and efficiency. Floating point arithmetic is based on the
idea of expressing a number as a product of a significant and a power of a base, such as 2 or
10. For example, the number 123.45 can be written as 1.2345 x 10^2 in base 10, or as
1.111011 x 2^6 in base 2.
Addition of 2.1 and 5.05
1. Rewrite the smaller number such that its exponent matches with the exponent of the
larger number (5.05 x 100).
2.1= 2.1 x 100
2. Add the mantissas
2.1 + 5.05 = 7.15 → 7.15 x 100

Multiplication of 0.37 x 7.0


1. Add the exponents
0 + 0 =0
2. Multiply the mantissas

0.37 x 7.0 = 2.59 → 2.59 x 100


Role of Sign bit, Exponent and Mantissa

The sign bit, exponent, and mantissa are three components of a floating-point number that
determine its value, magnitude, and precision.

The sign bit is the most significant bit of the binary representation of a floating-point
number. It indicates whether the number is positive or negative. A sign bit of 0 means the
number is positive, and a sign bit of 1 means the number is negative.

The exponent is a fixed number of bits (8 for single precision and 11 for double precision)
that store the power of 2 that the number is multiplied by. The exponent is biased by a
constant value (127 for single precision and 1023 for double precision) to allow for both
positive and negative exponents.

The mantissa is the remaining bits (23 for single precision and 52 for double precision) that
store the fractional part of the number. The mantissa represents the value of the number
after removing the sign and the exponent.

The sign bit, exponent, and mantissa play different roles in representing real numbers in
binary format. The sign bit determines the polarity of the number, the exponent determines
its order of magnitude, and the mantissa determines its precision and accuracy.

Exercise 5: Non-Numeric Data Representation


Non – numeric data is any form of data that is measured in non-number (or word) form. It
makes use of symbols and letters. Such data can only be identified in a word format. For
example, employee address, date of birth, name, etc.
ASCII
ASCII (American Standard Code for Information Interchange) is the most common character
encoding format for text data in computers and on the internet. Common encoding schemes
include:
UTF-8 (Unicode Transformation Format - 8-bit);
UTF-16 (Unicode Transformation Format - 16-bit);
UTF-32 (Unicode Transformation Format - 32-bit);
ISO 8859-1 (Latin-1);
ISO 8859-15 (Latin-9).
Representation of non-numeric data in computer
ASCII code
• American Standard Code for Information Interchange (ASCII)
• Each character uses 7 bits e.g.
• ‘A’ is represented by ‘1000001’ (65 in decimal)
• ‘a’ is represented by ‘1100001’ (90 in decimal)
• ‘1’ is represented by ‘0110001’ (49 in decimal)
• ‘?’ is represented by ‘0111111’ (63 in decimal)
• Delete is represented by ‘1111111’ (127 in decimal)
RGB
Image encoding using the RGB colour model involves representing each pixel in an image by
specifying the amounts of red (R), green (G), and blue (B) that make up its colour. RGB is an
additive colour model, where different combinations of these three primary colours create a
wide spectrum of colours.

There are several encoding schemes for images. One of the most popular schemes is JPEG.
There are others such as Base64, Bitmap and ISCII.
How an Image is Represented and Stored
A picture is stored with RGB (Red, Green, Blue) color information in digital format by
representing each pixel in the image as a combination of these three primary colors. This
format allows the representation of a wide range of colors by specifying the intensity of each
primary color. These are the steps involved:
1. Pixel Representation
2. Color Encoding
3. Color Depth
4. Image File Formats
5. Compression:
6. Editing and Processing
7. Display and Output
8. Conversion:

You might also like