Part 2 - Basic Structure of Computer Hardware and Software
Part 2 - Basic Structure of Computer Hardware and Software
Output Control
I/O Processor
Input Unit
🞇 The Input Unit accepts coded information from
human operators or from other computers.
🞇 Examples:
🞇 Keyboard, Joystick, Mouse, Input Pen, Touch Screen,
Trackball, Scanner, Bar Code Readers, Microphone,
Floppy Disks, Magnetic Tapes, Compact Disks
The Memory Unit – Primary Storage
🞇 Primary Storage or Main Memory (MM) – this is where
programs are stored during their execution. The MM is a
fast memory capable of operating at electronic speeds.
🞇 The information in MM is often processed in groups of
fixed size called words. The number of bits in a word is
the word length of the computer. Typical word lengths
range from 16 to 64 bits.
The Memory Unit – Primary Storage
🞇 MM is also known as random-access memory (RAM).
RAM is a memory in which any location can be reached in
a short, fixed amount of time.
🞇 The time required to access one word is the memory access
time. For RAMs, this time is fixed, independent of the
location of the word being accessed. It typically ranges
from 10 to 100 nanoseconds for most modern computers.
Processing Unit
🞇 Processing Unit. Also called the Central Processing Unit (CPU) or Central
Processor.
🞇 It contains a number of high-speed (10 times faster than MM) storage elements
called registers that are used for temporary storage of frequently used operands. It
is mandatory for data to be stored in a register before it can be processed.
🞇 The CPU is composed of the Arithmetic Logic Unit (ALU) and the Control Unit
(CU).
🞇 The ALU is where all arithmetic and logic operations and manipulation of number
take place. The CU is the nerve center of a computer. It controls the entire activity
of the CPU. It control and coordinates the order of execution of program
instructions. It accesses instructions in sequence, interprets them and then directs
their implementations.
Output Unit
🞇 It sends processed results to the outside world.
🞇 Examples:
🞇 Display Screens, Printers, Plotters, Modems,
Microfilms, Synthesizers, High-Tech Blackboards,
Film Recorders
Basic Operation of a Computer
1. The computer accepts information in the form of programs and
data through an input unit and stores it in memory.
2. Information stored in the memory is fetched, under program
control, into an arithmetic and logic unit, where it is processed.
3. Processed information leaves the computer through an output
unit.
4. All activities inside the machine are directed by the control
unit.
Types of Programming Language
🞇 Machine Language
🞇 Assembly Language
🞇 High-Level Language
🞇 4GL Language
Machine Language
🞇 The natural or primitive language that the
computer actually understands. This programming
consists of 0’s and 1’s which makes programming
very difficult.
Assembly Language
🞇 A programming language that uses “abbreviations” or
mnemonics in place of binary patterns in order to make
the task of programming easier.
🞇 An assembly language program has to be converted to
machine language before a computer can execute it. An
assembler is a special program that translates assembly
language mnemonics into machine language.
High-Level Language
🞇 A programming language that uses English-like
commands or instructions.
🞇 A high-level language has to be converted to
machine language before a computer can execute it.
A compiler is a special program that translates high-
level language instructions into machine language.
Fourth Generation Language
🞇 A fourth-generation programming language (or 4GL) is a
programming language design with a specific purpose in
mind such as the development of commercial business
software.
🞇 All 4GLs are designed to reduce:
🞇 Programming effort
🞇 The time it takes to develop software
🞇 The cost of software development
Advantages of High-Level Languages
🞇 Easy to Learn. Low-level languages are more cryptic than high level
language.
🞇 Predefined Functions. Most high-level languages provide pre-defined
functions and subroutines, thereby simplifying programming tasks.
🞇 Portability. Low-level languages are specific towards a certain
processor. The instruction set of the Intel processors (IBM PC’s and
compatibles) is very much different from the instruction set of
Motorola processors (Apple Macintosh).
Advantages of Low-Level Languages
🞇 Compact Code. Programs are executed in their machine language format.
Programs written in a high-level language should still be compiled and
translated to machine language. Most compilers are not optimized to generate
compact code.
🞇 Speed. This is directly related to compact code. The shorter the code, the
shorter the execution time of the program.
🞇 Flexible. Low-level language does not constrain the programmer to follow a
certain programming convention (i.e., modularity) or a rigid coding
constraint (i.e., the called routine should be placed before the calling routine).
Thank you