Академический Документы
Профессиональный Документы
Культура Документы
LOW – LEVEL
uses mnemonic representation of a
machine instruction
provides little or no abstraction
from a computer's processor (closer
to the hardware)
4-2-1. PROGRAMMING LANGUAGES
Categories
i. First Generation
refers to machine code
very low level native language of
a computer
mostly incomprehensible to
humans
the only language that the
processor can understand
4-2-1. PROGRAMMING LANGUAGES
Categories
ii. Second Generation
refers to assembly language
it is not a processor's native
language
a human - writeable form of
a processor's native instruction
set
4-2-1. PROGRAMMING LANGUAGES
HIGH - LEVEL
close to plain English thus it is easier
to understand
more user - friendly and platform -
independent
Example:
C, C++, Java, OOP languages
4-2-1. PROGRAMMING LANGUAGES
2. Object Code
machine code (binary)
set of processor - readable opcodes
and data
4-2-1. PROGRAMMING LANGUAGES
opcode
a binary value that is recognized
by a processor as one of the instructions
in its instruction set
4-2-1a. PROGRAMMING TOOLS
Assembler
translates source code to object code
translates human – readable assembly language
programs into machine - readable code that the
target processor can understand and execute
simpler than compilers
4-2-1a. PROGRAMMING TOOLS
Compiler
translates statements in one language into
another language
translates high-level language programs into the
machine-language instructions that a particular
processor can understand and execute. However,
the object code that results is not yet ready to be
run
4-2-1a. PROGRAMMING TOOLS
Interpreter
executes other programs
requires a longer time to run a program but
takes less time to interpret the program
Linker
run after all of the source les have been
compiled and assembled into object files
takes one or more objects generated by
compilers and assembles them into a single
executable program
4-2-1a. PROGRAMMING TOOLS
Debugger
a computer program used to debug
other programs
can run a program step by step,
stop/break at some kind of event by
means of a breakpoint, and tracking
the values of some variables
some have the ability to modify the
state of the program while it is
running
4-2-1a. PROGRAMMING TOOLS
Simulator
attempts to represent certain features of the
behavior of a physical or abstract system by the
behavior of another system
4-2-1a. PROGRAMMING TOOLS
Emulator
allows computer programs to run on a platform
other than the one for which they were originally
written
attempts to reproduce the behavior
of the device being emulated
Types of RAM
1. Static RAM
stores data in flip – flops
requires steady flow of electricity to
maintain its contents
2. Dynamic RAM
stores each bit in a capacitor and transistor
has to be refreshed periodically
has longer access times
4-3-1. MEMORY
Types of ROM
1. Masked – Programmed ROM (MROM)
ROM that is programmed when
manufactured
simply called ROM
2. Programmable ROM
can be programmed only once via a special
device called PROM programmer/burner
sometimes referred to as write - once
or one - time programmable
4-3-1. MEMORY
Types of ROM
3. Erasable Programmable ROM (EPROM)
requires users to erase the contents
before new values can be written
4. Electrically Erasable ROM (EEROM)
can be erased and reprogrammed by
electrical signals
requires erasing the contents of the
memory before reprogramming
4-3-1. MEMORY
Flash Memory
a solid-state, non-volatile, rewritable
memory that functions like RAM and a
hard disk combined (no moving parts,
electronic)
a close relative to the EEPROM
has larger capacity than EEPROM
offers fast read access times and better
shock resistance than hard disk
4-3-1. MEMORY
Clock Frequency
The rate at which the CPU clock runs.
Measured in hertz (usually MHz or GHz,
though some systems do run in the kHz range
to save power)
CENTRAL PROCESSING UNIT (CPU)
CPU Components
1. Registers
Classes:
a. Data Register
used to store numbers
b. Address Register
Hold memory addresses
CENTRAL PROCESSING UNIT (CPU)
Classes:
c. General Purpose Register (GPR)
can store both data and addresses
d. Floating Point Register (FPR)
stores floating point numbers
e. Constant Register
holds read-only values
f. Vector Register
holds data for processing done by
SIMD (single instruction, multiple
data) instructions
CENTRAL PROCESSING UNIT (CPU)
Classes:
g. Special Purpose Registers
stores program state
usually includes program
counter/instruction pointer, stack
pointer and status register/status
word
CENTRAL PROCESSING UNIT (CPU)
CPU Components
2. Arithmetic Logic Unit (ALU)
performs all numerical computations
and logical evaluations for the processor
receives data from the memory, performs
the operation, writes the result back to
the memory
CENTRAL PROCESSING UNIT (CPU)
CPU Components
3. Control Unit
decodes and monitors the execution of
Instructions
directs the sequence of operation
CENTRAL PROCESSING UNIT (CPU)
Computer Bus
physical link between various
computer components
CENTRAL PROCESSING UNIT (CPU)
2. Data Bus
3. Control Bus
COMPUTER ARCHITECTURE
HARVARD ARCHITECTURE
HARVARD ARCHITECTURE
STORED
PROGRAM
I/O ALU
STORED
DATA
COMPUTER ARCHITECTURE
Instruction Set
the full suite of opcodes recognized by a
particular processor or family
COMPUTER ARCHITECTURE
Clock cycle
time it takes the central processing unit
(CPU) to execute the simplest instruction
Instruction Cycle
the time it takes to fetch and execute a
single opcode
Each instruction can be executed in a single
clock cycle