Day 1
Day 1
By
Samuel K. Opoku
Computer Science Department
Kumasi Technical University
Video Link
https://blackboard.skopoku.org/tutorials/data_rep.mp4
1
CONTENT
• Computer Architecture and Operations
2
COMPONENTS OF A COMPUTER SYSTEM
10
3
COMPONENTS OF THE MOTHER BOARD
12
4
• A typical inner architecture of an Integrated Circuit
16
SCHEMATIC REPRESENTATION
• based on stored
program design
• processor system
– CPU
– memory
• input/output system
– input/output devices
– secondary storage
18
5
CENTRAL PROCESSING UNIT
• CPU is a complex set of electronic circuitry that controls and executes
stored program instructions
• Two parts
– Control Unit (CU):
• Directs the computer system to execute stored program instructions.
Must communicate with memory and ALU. Sends data and
instructions from secondary storage to memory as needed
19
20
6
DATA STORAGE AND CPU
• Two types of storage:
– Primary storage (memory): Stores data temporarily. CPU refers to it
for both program instructions and data
– Secondary storage: Long-term storage. Stored on external medium,
such as a disk
• CPU cannot process data from disk or input device. It must first reside in
memory. Control unit retrieves data from disk and moves it into memory.
Items are sent to ALU for processing. Control unit sends items to ALU,
then sends back to memory after processing
• Data and instructions are held in memory until sent to an output or storage
device or program is shut down
21
MAIN MEMORY
• (fast access) storage device for preserving binary data and instructions
• memory is divided into units such as bytes or words
• each is usually a standard size or fixed-length
• each memory word has a unique address for random access
• Types:
Random Access Memory (RAM) Read Only Memory (ROM)
– readable – readable
– writeable – permanent
– usually volatile (e.g., Dynamic – Nonvolatile
RAM or DRAM)
– general storage – special-purpose storage for
data and instructions
22
7
MAIN MEMORY
• Each memory location has an address: A unique number, much like a
mailbox. May contain only one instruction or piece of data . When data is
written back to memory, previous contents of that address are destroyed
• Location is referred to by number but programming languages use a
symbolic (named) address called variables, such as Hours or Salary
23
REGISTERS
24
8
THE CPU AND MAIN MEMORY
25
Memory
Memory Data Register
Address
Register
Accumulator
(work register)
Instruction
register
Program Arithmetic
counter System Logic Unit
clock
26
9
FETCH THE INSTRUCTION
10
SYSTEM CLOCK
• Function of the system clock: synchronizes all the components on the mother
board. If the clock is high, all the components do their work. Because the CPU
needs to perform more operations per time than the mother board, the CPU clock is
much higher.
• If the clock speed (or clock rate) is say 2GHz, it means the clock pulses (clock
cycles) 2 billion times per second. That is, under ideal circumstances, the
processor/CPU should execute 2 billions instructions per second. However, in real
world scenarios, the CPU is often stuck waiting for other components to answer
back, especially RAM and disk. Delays can occur every time a program has to
make a decision about which code path to go (conditionals)
Note: Modern processors try to beat this by predicting which path will be taken before
that point is actually reached, but if the prediction turns out to be wrong you incur
additional penalties.
Thus increasing clock frequency does increase the operations per second, but number
of operations performed by the CPU is largely defined based on the underlying CPU
architecture itself and the actual code running on the CPU
29
• Program Control
– starting a program
– halting a program
– skipping to other instructions
– testing data to decide whether to skip over
some instructions
30
11
OPERATIONS WITHIN DIGITAL SYSTEMS(1/2)
Four operations to which information may be subjected to in digital
systems are:
32
12
Data Representation and Processing
34
DEFINITIONS (1/2)
• Data:
o It refers to any or all facts, numbers, letters and symbols that
describe an object, idea conditions, situations, event or some
other factors
o Data is intended to depict a real life phenomenon but in
themselves do not make any sense
o In computing, data refers to symbols (materials) to be operated
upon by the computer
• Information:
o It refers processed data that makes sense and meaningful to the
recipient of the information
35
13
DEFINITIONS (2/2)
o Mathematically: Information = Data + Meaning
• Knowledge:
o It is derived from operation of data and/or information that
goes a long way to strengthen decisions that users make
NB: There are also systems called hybrids which combine the methods
of both discrete and analogue systems
37
14
DATA REPRESENTATION AND PROCESSING (2/2)
• Data processing in digital systems is done in such a way that if a
real operation (P) is performed on the data (I) to give result (O),
then a representation of P is performed on a representation of I to
give a representation of O.
38
40
15
INTERNAL REPRESENTATION OF DATA
• Both instructions and the data which the computer deals with are made up of
symbols called characters that are coded in the form suitable for electronic
storage
• Below is a typical storage code for the character A and the decimal digit 1
41
• Transistors are electronic switches that may or may not allow electric
current to pass through. If current passes through, switch is on, representing
a 1 bit Otherwise, switch is off, representing a 0 bit
16
BYTE AND WORD
• Byte: A group of 8 bits.
– Each byte has 256 (28) possible values
– For text, stores one character: Can be letter, digit, or special character
– Memory and storage devices measured in number of bytes
• Storage Size
– Kilobyte: 1024 (210) bytes
– Megabyte: roughly one million (220) bytes
– Gigabyte: roughly one billion (230) bytes
– Terabyte: roughly one trillion (240) bytes 43
CALCULATIONS
Note: 1024 Kilo = 1 Mega and 8bits = 1B or a byte
1GB RAM = 1024MB RAM which contains 8(1024)2 transistors
(convert byte to bits by multiplying it by 8)
2. How many characters will a RAM of the following sizes store when a
byte is used to store a character:
a. 156MB b. 225MB c. 2GB d. 98KB
44
17
47
Assignment
Describe how the computer handles images, audio and video files. Your
report should be precise and concise without any ambiguity but should
NOT be more than 200 words
Note:
• Your work will be ignored if the file type is not text (.txt) and the
report contains more than 200 words
18
HIT ANY KEY TO END DAY 1
50
19