0% found this document useful (0 votes)
0 views6 pages

Course Note 4

The document outlines the hierarchical structure of computer architecture, detailing seven levels from user applications to physical components like transistors. It also discusses the specification and translation of programming languages, including the roles of compilers and interpreters in converting code into machine-readable formats. Additionally, it distinguishes between computer architecture and organization, highlighting their respective focuses on design and user-visible structure.

Uploaded by

jalalademola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views6 pages

Course Note 4

The document outlines the hierarchical structure of computer architecture, detailing seven levels from user applications to physical components like transistors. It also discusses the specification and translation of programming languages, including the roles of compilers and interpreters in converting code into machine-readable formats. Additionally, it distinguishes between computer architecture and organization, highlighting their respective focuses on design and user-visible structure.

Uploaded by

jalalademola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

3.

2 LEVELS WITHIN COMPUTER ARCHITECTURE

A computer is a complex system; contemporary computers contain millions of elementary electronic


components. How, then, can one clearly describe them? The key is to recognize the hierarchic nature
of most complex systems, including the computer. A hierarchic system is a set of interrelated
subsystem, each of the latter, in turn, hierarchic in structure until we reach some lowest level of
elementary subsystem. The hierarchic nature of complex system is essential to both their design and
their description. The designer need only deal with a particular level of the system at a time. At each
level, the system consists of a set of components and their interrelationships. The behavior at each
level depends only on a simplified, abstracted characterization of the system at the next lower level.
At each level, the designer is concerned with structure and function. Figure 3 shows the seven levels
in the computer, from the user level down to the transistor level.

User Level: Application Program


High Level language
Assembly Language? Machine Code
Microprogrammed/Hardwired Control
Functional Units( Memory, ALU etc)
Logic Gates
Low Level Transistion and Wires
Level of machiine in the computer hierarchy
As we progress from the top level downward, the levels become less “abstract” and more of the
internal structure of the computer shows through. These levels are discussed below.
User or Application-Program Level
The applications layer is the language of the computer as seen by the end user. We are most
familiar with the user, or application program level of the computer. At this level, the user
interacts with the computer by running programs such as word processors, spreadsheet programs,
or games. Here the user sees the computer through the programs that run on it, and little (if any)
of its internal or lower-level structure is visible.
High Level Language Level
Anyone who has programmed a computer in a high level language such as C, Pascal,
FORTRAN, or Java, has interacted with the computer at this level. It is the role of the compiler
to map data types and instructions from the high-level language to the actual computer hardware.
Programs written in a high-level language can be re-compiled for various machines that will
(hopefully) run the same and provide the same results regardless of which machine on which
they are compiled and run.
Assembly Language/Machine Code Level
This controls the way in which all software uses the hardware layers. Programming with 1s and
0s is tedious and error prone. As a result, one of the first computer programs written was the
assembler, which translates ordinary language mnemonics such as MOVE Data, Acc, into their
corresponding machine language 1s and 0s.
Hardwired Control (Machine layer)
It is the control unit that effects the register transfers. It does so by means of control signals
that transfer the data from register to register, possibly through a logic circuit that transforms it in
some way. Hardwired control units have the advantages of speed and component count, but until
recently were exceedingly difficult to design and modify.Functional Unit (Microprogrammed
Layer)
The microprogrammed layer interprets the machine language instructions from the machine
layer and directly causes the digital logic elements to perform the required operations. Logic
Gates (Digital Logic layer)
The level at which any semblance of the computer’s higher-level functioning is visible is at the
logic gate and transistor levels. It is from logic gates that the functional units are built, and from
transistors that logic gates are built. The logic gates implement the lowest-level logical
operations upon which the computer’s functioning depends.
Physical Layer
At the very lowest level, a computer consists of electrical components such as transistors and
wires, which make up the logic gates, but at this level the functioning of the computer is lost in
details of voltage, current, signal propagation delays, quantum effects, and other low-level
matters.
3.3 MICROPROCESSOR
A computer consists of five functionally independent main parts input, memory, Arithmetic and
Logic Unit (ALU), output and control unit

SPECIFICATION AND TRANSLATION OF A PROGRAMMING LANGUAGE

The specification and translation of a programming language involve defining the rules and
syntax of the language and then transforming the code written in that language into executable
machine code or an intermediate representation that can be executed by a computer.

1. Specification of a Programming Language:

 Syntax and Semantics: A programming language's specification defines its syntax (the
structure and grammar of valid language constructs) and semantics (the meaning of those
constructs).

 Language Features: It outlines the available data types, control structures (loops,
conditionals), functions or procedures, and other elements within the language.

 Standardization: Some languages have formal specifications set by standardization


bodies (like ANSI, ISO), while others have informal specifications maintained by
communities or organizations.

2. Translation of a Programming Language:

 Compiler or Interpreter: Translation involves using a compiler or interpreter to convert


the human-readable code written in a high-level programming language into machine
code or an intermediate representation.
Compiler:

 Translation Process: A compiler translates the entire source code into an executable or
an intermediate form (like bytecode). It typically includes several stages: lexical analysis
(breaking code into tokens), syntax analysis (parsing the code structure), semantic
analysis (checking semantics and generating intermediate code), optimization, and code
generation.

 Output: The result is an executable file or bytecode that can be run on the target
platform.

Interpreter:

 Line-by-Line Execution: An interpreter translates and executes the code line by line or
statement by statement without producing a separate compiled output.

 Execution Process: It reads each line, interprets it, and executes the corresponding
operations immediately without creating a compiled version beforehand.

S/N Interpreter Compiler


1. Translate program on line by It translates the whole program
line basis at a time
2. Interpret syntax errors Identify both syntax and
semantic errors
3. Will not generate an object Will generate an object code
code
4. Used in developed Used in production
environment environment
5. A little bit slower Faster than an ainterpreter.

Assembler: Is a Low Level Language translator. It translate symbolic codes and symbolic
address into actual machine addresses. It is less time consuming because it is machine orientd.
Just-In-Time (JIT) Compilation:
 Hybrid Approach: Some systems use JIT compilation, where code is initially
interpreted but then compiled into native machine code for performance improvements
during execution.

 Runtime Translation: JIT compilation occurs at runtime, translating portions of code


into machine code as needed and caching the results for future use.

Both compilers and interpreters play crucial roles in the translation process, converting human-
readable code into a form that computers can understand and execute. The choice between
compilers and interpreters often depends on factors like performance, development speed, and
the target environment of the programming language.

Computer Architecture is concerned with the way hardware components are connected together
to form a computer system. It deals with design of computers, data storage devices and
networking components that store and run programs, transmit data and drive interaction between
computers across networks and with users.

ii. The Types are:


1. Von-Neumann Architecture 2. Harvard Architecture 3. Instruction Set
Architecture
4. Micro Architecture 5. System Design 21/2mks

Computer organization is concerned with the structure and behavior of a computer system as
seen by the user. It act as the interface between hardware and software of a connection in
a system.

It also deals with the structural relationship that are not visible to the programmers such
as interfaces to peripherals device, the clock frequency and the technology used for the
memory. It is also internal working storage structure and implementation of a computer
system. 31/2mks

b. Differences between Computer Architecture and Computer organization


S/N Computer Architecture Computer organization
1. It is concerned with the way It is concerned with the structure and
hardware components are connected behavior of a computer system as seen by
to for a computer system. user of connection in a system.
2. Act as an interface between hardware Deals with component of connection in a
and software system.
3. Helps to understand the functionality Tells us how all the units in a system are
of a system arranged and interconnected
4. Programmer can view it in terms of It expresses realization of architecture
instruction addressing modes and
registers
5. Deals wit High Level design Deals with Low Level design
6. Architect is concerned firstly in It is done on the basis of architecture
designing a computer system
7. Involves Logic Instruction set, Involves physical components (circuit
addressing modes, datatype, cache design, adders, signal, Peripherals)
optimization

uses of Computer Organization

i. It is used for maximizing the performance of a computer system.

ii. It reduces the costs as well as power consumption of a system.

You might also like