Home

Lakhasly

Online English Summarizer tool, free and accurate!

A Hierarchy of Languages Application Programs High-Level Languages Machine independent Machine specific Assembly Language Machine Language Hardware Computer Organization and Architecture High-Level Language Low-Level Language Dr.Tarek Abdul Hameed 4 Assembly and Machine Language ?Used to wire and interconnect the various components 23 Computer Organization and Architecture Dr.Tarek Abdul Hameed Fetch - Execute Cycle Infinite Cycle implemented in Hardware Instruction Fetch Instruction Decode Execute Memory Access Writeback Result Computer Organization and Architecture Fetch instruction Compute address of next instruction Generate control signals for instruction Read operands from registers Compute result value Read or write memory (load/store) Writeback result in a register Dr.Tarek Abdul Hameed 24 Microprocessors Building Blocks Computer Organization and Architecture Dr.Tarek Abdul Hameed 25 Microprocessor Memory Bus RAM I/O Data Cache Control Unit Bus Interface Unit System Bus Instruction Decoder Instruction Cache Computer Organization and Architecture Arithmetic & Logic Unit Registers Floating Point Unit Registers 26 Dr.Tarek Abdul Hameed Bus Interface Unit ?Computer Organization and Architecture Dr.Tarek Abdul Hameed 8 Translating Languages Program (C Language): swap(int v[], int k) { int temp; temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; } Compiler MIPS Assembly Language: sll $2,$5, 2 add $2,$4,$2 lw $15,0($2) lw $16,4($2) sw $16,0($2) sw $15,4($2) jr $31 Computer Organization and Architecture A statement in a high-level language is translated typically into several machine-level instructions MIPS Machine Language: Assembler 00051080 00821020 8C620000 8CF20004 ACF20000 AC620004 03E00008 9 Dr.Tarek Abdul Hameed Advantages of High-Level Languages ?Also known as the "Integer Unit" ? It performs whole-number math calculations (subtract, multiply, divide, etc) comparisons (is greater than, is smaller than, etc.) and logical operations (NOT, OR, AND, etc) ? The new breed of popular microprocessors have not one but two almost identical ALU's that can do calculations simultaneously, doubling the capability Computer Organization and Architecture Dr.Tarek Abdul Hameed 29 Floating-Point Unit (FPU) ? Also known as the "Numeric Unit" ?Sparc, Ultra Sparc 1985 0n ?Allows you to view machine instructions, memory, and registers Computer Organization and Architecture Dr.Tarek Abdul Hameed 12 Assemble and Link Process Source File Source File Assembler Assembler Source File Assembler Object File Object File Object File Linker Link Libraries Executable File A project may consist of multiple source files Assembler translates each source file separately into an object file Linker links all object files together with link libraries Computer Organization and Architecture Dr.Tarek Abdul Hameed 13 Components of a Computer System Computer ?Network: newly added component for communication Memory Control Processor Datapath I/O Devices Input B U S Network Computer Organization and Architecture Output Disk Dr.Tarek Abdul Hameed 14 Memory ?Tasks include fetching instructions & data, storing data, managing input/output devices Computer Organization and Architecture Dr.Tarek Abdul Hameed 32 That was the structure, now let's talk about the language of a microprocessor Computer Organization and Architecture 33 Dr.Tarek Abdul Hameed Instruction Set ?Most new PC's are equipped with this RAM which is able to synchronize itself with the processor, enabling data transfer at more than twice the speed of previous RAM technologies) 18 Computer Organization and Architecture Dr.Tarek Abdul Hameed Main (Internal) Memory ?Control: generates control signals for each instruction Next Program Counter Program Counter Instruction Cache Instruction Registers A L U Data Cache Control Computer Organization and Architecture Dr.Tarek Abdul Hameed 22 Datapath Components ?Then, it passes on the decoded instruction to the ALU or FPU Computer Organization and Architecture Dr.Tarek Abdul Hameed 28 Arithmetic & Logic Unit (ALU) ?Bigger instruction-sets mean more complex chips (higher costs, reduced efficiency), but shorter programs Computer Organization and Architecture Dr.Tarek Abdul Hameed 34 Instruction Set Architecture (ISA) ?DRAM is called Dynamic RAM because the memory content needs to be refreshed periodically (every few milliseconds) due to leakage of electrical charge.Indirectly via an assembler Computer Organization and Architecture Dr.Tarek Abdul Hameed 5 Compiler and Assembler Computer Organization and Architecture Dr.Tarek Abdul Hameed 6 Instructions and Machine Language ?SRAMis called static because the memory retains its contents as long as power is supplied-It does not have to be periodically refreshed as in DRAM. It is used to store BIOS (Basic Input/Output System-helps to load and locate an operating system), external to microprocessor, and computer instruction sets, internal to microprocessor ?Writing to a PROM destroys the internal links, so a basic PROM can only be programmed once 19 Dr.Tarek Abdul Hameed Computer Organization and Architecture The Need for a Memory Hierarchy ?Access time: milliseconds Faster Memory Bus Memory I/O Bus Bigger Disk, Tape, etc Computer Organization and Architecture Dr.Tarek Abdul Hameed 21 Processor ?Also receives the processed data and sends it to the main memory Computer Organization and Architecture Dr.Tarek Abdul Hameed 27 Instruction Decoder ?However, Assembly language programs are not portable Computer Organization and Architecture Dr.Tarek Abdul Hameed 10 Why Learn Assembly Language?Writing compact code Computer Organization and Architecture Dr.Tarek Abdul Hameed 11 Assembly Language Programming Tools ?Up to 264 bytes of physical address space 15 Computer Organization and Architecture Dr.Tarek Abdul Hameed Address Space Computer Organization and Architecture Address Space is the set of memory locations (bytes) that can be addressed 16 Dr.Tarek Abdul Hameed Address, Data, and Control Bus ?When you turn the computer on, ROM automatically prepares the computer system and loads the initial display screen prompt ?This unit receives the programming instructions and decodes them into a form that is understandable by the processing units, i.e. the ALU or FPU ?TheALUcandothese calculations as well, but will do them very slowly Computer Organization and Architecture Dr.Tarek Abdul Hameed 30 Registers ?Processed data goes back to the data cache and then to main memory from these registers Computer Organization and Architecture Dr.Tarek Abdul Hameed 31 Control Unit ?Alpha (now Compaq, now HP) in 1990's Computer Organization and Architecture 36 Dr.Tarek Abdul Hameed More computer families ?Computer Organization and Architecture Dr.Tarek Abdul Hameed 7 Instruction Fields ?Operands fields which specify where to get the source and destination operands for the operation specified by the opcode.Cache memory is small in size but fast Computer Organization and Architecture Dr.Tarek Abdul Hameed 20 Typical Memory Hierarchy ?input-output control Computer Organization and Architecture Dr.Tarek Abdul Hameed 35 Some Computer families ?Avariation of ROM is PROM (Programmable Read Only Memory), in which the user can load programs and data that are read only.It performs calculations that involve numbers represented in the scientific notation (also known as floating-point numbers).Compatibility of software between various implementations ?RAM-RandomAccessMemory.??????..??????????

Original text

A Hierarchy of Languages
Application Programs
High-Level Languages
Machine independent
Machine specific
Assembly Language
Machine Language
Hardware
Computer Organization and Architecture
High-Level Language
Low-Level Language
Dr.Tarek Abdul Hameed
4
Assembly and Machine Language
 Machine language
 Native to a processor: executed directly by hardware
 Instructions consist of binary code: 1s and 0s
 Assembly language
 Slightly higher-level language
 Readability of instructions is better than machine language
 One-to-one correspondence with machine language instructions
 Assemblers translate assembly to machine code
 Compilers translate high-level programs to machine code
 Either directly, or
 Indirectly via an assembler
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
5
Compiler and Assembler
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
6
Instructions and Machine Language
 Each command of a program is called an instruction (it instructs the computer
what to do).

 Computers only deal with binary data, hence the instructions must be in binary
format (0s and 1s) .
 The set of all instructions (in binary form) makes up the computer's machine
language. This is also referred to as the instruction set.
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
7
Instruction Fields
 Machine language instructions usually are made up of several fields. Each field
specifies different information for the computer. The major two fields are:
 Opcode field which stands for operation code and it specifies the particular
operation that is to be performed.
 Each operation has its unique opcode.
 Operands fields which specify where to get the source and destination operands
for the operation specified by the opcode.
 The source/destination of operands can be a constant, the memory or one of
the general-purpose registers.
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
8
Translating Languages
Program (C Language):
swap(int v[], int k) {
int temp;
temp = v[k];
v[k] = v[k+1];
v[k+1] = temp;
}
Compiler
MIPS Assembly Language:
sll $2,$5, 2
add $2,$4,$2
lw $15,0($2)
lw $16,4($2)
sw $16,0($2)
sw $15,4($2)
jr $31
Computer Organization and Architecture
A statement in a high-level
language is translated
typically into several
machine-level instructions
MIPS Machine Language:
Assembler
00051080
00821020
8C620000
8CF20004
ACF20000
AC620004
03E00008
9
Dr.Tarek Abdul Hameed
Advantages of High-Level Languages
 Program development is faster
 High-level statements: fewer instructions to code
 Program maintenance is easier
 For the same above reasons
 Programs are portable
 Contain few machine-dependent details
 Can be used with little or no modifications on different machines
 Compiler translates to the target machine language
 However, Assembly language programs are not portable
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
10
Why Learn Assembly Language?
 Many reasons:
 Accessibility to system hardware
 Space and time efficiency
 Writing a compiler for a high-level language
 Accessibility to system hardware
 Assembly Language is useful for implementing system software
 Also useful for small embedded system applications
 Space and Time efficiency
 Understanding sources of program inefficiency
 Tuning program performance
 Writing compact code
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
11
Assembly Language Programming Tools
 Editor
 Allows you to create and edit assembly language source files
 Assembler
 Converts assembly language programs into object files
 Object files contain the machine instructions
 Linker
 Combines object files created by the assembler with link libraries
 Produces a single executable program
 Debugger
 Allows you to trace the execution of a program
 Allows you to view machine instructions, memory, and registers
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
12
Assemble and Link Process
Source
File
Source
File
Assembler
Assembler
Source
File
Assembler
Object
File
Object
File
Object
File
Linker
Link
Libraries
Executable
File
A project may consist of multiple source files
Assembler translates each source file separately into an object file
Linker links all object files together with link libraries
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
13
Components of a Computer System
Computer
 Processor
 Datapath
 Control
 Memory & Storage
 Main Memory
 Disk Storage
 Input devices
 Output devices
 Bus: Interconnects processor to memory and I/O
 Network: newly added component for communication
Memory
Control
Processor
Datapath
I/O Devices
Input
B
U
S
Network
Computer Organization and Architecture
Output
Disk
Dr.Tarek Abdul Hameed
14
Memory
 Ordered sequence of bytes
 The sequence number is called the memory address
 Byte addressable memory
 Each byte has a unique address
 Supported by almost all processors
 Physical address space
 Determined by the address bus width
 Pentium has a 32-bit address bus
 Physical address space = 4GB = 232 bytes
 Itanium with a 64-bit address bus can support
 Up to 264 bytes of physical address space
15
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
Address Space
Computer Organization and Architecture
Address Space is the
set of memory
locations (bytes) that
can be addressed
16
Dr.Tarek Abdul Hameed
Address, Data, and Control Bus
 Address Bus
 Memory address is put on address bus
 If memory address = a bits then 2a locations are addressed
 Data Bus: bi-directional bus
 Data can be transferred in both directions on the data bus
 Control Bus
 Signals control transfer
of data
 Read request
 Write request
 Done transfer
Processor
Address Register
Data Register
Bus Control
address bus
a bits
data bus
d bits
read
write
done
Memory
0
1
2
3
. . .
2a– 1
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
17
Main (Internal) Memory
 RAM–RandomAccessMemory.
 Temporary read/write memory.
 Applications are typically loaded into RAM during computer use. Types of RAM include:
 SRAM(Static)
 SRAMis called static because the memory retains its contents as long as power is
supplied-It does not have to be periodically refreshed as in DRAM.
 It is faster than DRAM (The contents of the memory can be read much faster),
however is more expensive and is larger in size
 DRAM(Dynamic )
 DRAM is called Dynamic RAM because the memory content needs to be
refreshed periodically (every few milliseconds) due to leakage of electrical
charge.
 It is slower than SRAM, but cheaper and smaller in size
 EDORAM(ExtendedDataOut) ,
 SDRAM(Synchronous Dynamic)
 Most new PC’s are equipped with this RAM which is able to synchronize itself
with the processor, enabling data transfer at more than twice the speed of
previous RAM technologies)
18
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
Main (Internal) Memory
 ROM–ReadOnlyMemory.
 ROMcantypically be written once, but read many times.
 It is used to store BIOS (Basic Input/Output System-helps to load and locate an operating
system), external to microprocessor, and computer instruction sets, internal to
microprocessor
 The contents of the ROM are hard wired by the manufacturer in a typical ROM chip.
 When you turn the computer on, ROM automatically prepares the computer system
and loads the initial display screen prompt
 Avariation of ROM is PROM (Programmable Read Only Memory), in which the user
can load programs and data that are read only.
 This can be done with device called a PROM programmer.
 Writing to a PROM destroys the internal links, so a basic PROM can only be
programmed once
19
Dr.Tarek Abdul Hameed
Computer Organization and Architecture
The Need for a Memory Hierarchy
 Widening speed gap between CPU and main memory
 Processor operation takes less than 1 ns
 Main memory requires more than 50 ns to access
 Each instruction involves at least one memory access
 One memory access to fetch the instruction
 A second memory access for load and store instructions
 Memory bandwidth limits the instruction execution rate
 Cache memory can help bridge the CPU-memory gap
 Cache memory is small in size but fast
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
20
Typical Memory Hierarchy
 Registers are at the top of the hierarchy
 Typical size < 1 KB
 Access time < 0.5 ns
 Level 1 Cache (8 – 64 KB)
 Access time: 0.5 – 1 ns
 L2 Cache (512KB – 8MB)
 Access time: 2 – 10 ns
Microprocessor
Registers
L1 Cache
L2 Cache
 Main Memory (1 – 2 GB)
 Access time: 50 – 70 ns
 Disk Storage (> 200 GB)
 Access time: milliseconds
Faster
Memory Bus
Memory
I/O Bus
Bigger
Disk, Tape, etc
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
21
Processor
 Datapath: part of a processor that executes instructions
 Control: generates control signals for each instruction
Next Program
Counter
Program Counter
Instruction
Cache
Instruction
Registers
A
L
U
Data
Cache
Control
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
22
Datapath Components
 Program Counter (PC)
 Contains address of instruction to be fetched
 Next Program Counter: computes address of next instruction
 Instruction Register (IR)
 Stores the fetched instruction
 Instruction and Data Caches
 Small and fast memory containing most recent instructions/data
 Register File
 General-purpose registers used for intermediate computations
 ALU = Arithmetic and Logic Unit
 Executes arithmetic and logic instructions
 Buses
 Used to wire and interconnect the various components
23 Computer Organization and Architecture
Dr.Tarek Abdul Hameed
Fetch - Execute Cycle
Infinite Cycle implemented in Hardware
Instruction Fetch
Instruction Decode
Execute
Memory Access
Writeback Result
Computer Organization and Architecture
Fetch instruction
Compute address of next instruction
Generate control signals for instruction
Read operands from registers
Compute result value
Read or write memory (load/store)
Writeback result in a register
Dr.Tarek Abdul Hameed
24
Microprocessors Building Blocks
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
25
Microprocessor
Memory
Bus
RAM
I/O
Data
Cache
Control
Unit
Bus
Interface
Unit
System
Bus
Instruction
Decoder
Instruction
Cache
Computer Organization and Architecture
Arithmetic
& Logic
Unit
Registers
Floating
Point
Unit
Registers
26
Dr.Tarek Abdul Hameed
Bus Interface Unit
 Receives instructions & data from main memory
 Instructions are then sent to the instruction cache, data to the data cache
 Also receives the processed data and sends it to the main memory
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
27
Instruction Decoder
 This unit receives the programming instructions and decodes them into a form that
is understandable by the processing units, i.e. the ALU or FPU
 Then, it passes on the decoded instruction to the ALU or FPU
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
28
Arithmetic & Logic Unit (ALU)
 Also known as the “Integer Unit”
 It performs whole-number math calculations (subtract, multiply, divide, etc)
comparisons (is greater than, is smaller than, etc.) and logical operations (NOT,
OR, AND, etc)
 The new breed of popular microprocessors have not one but two almost identical
ALU’s that can do calculations simultaneously, doubling the capability
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
29
Floating-Point Unit (FPU)
 Also known as the “Numeric Unit”
 It performs calculations that involve numbers represented in the scientific
notation (also known as floating-point numbers).
 This notation can represent extremely small and extremely large numbers in a
compact form
 Floating-point calculations are required for doing graphics, engineering and
scientific work
 TheALUcandothese calculations as well, but will do them very slowly
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
30
Registers
 Both ALU & FPU have a very small amount of super-fast private memory placed
right next to them for their exclusive use. These are called registers
 The ALU &FPUstore intermediate and final results from their calculations in these
registers
 Processed data goes back to the data cache and then to main memory from these
registers
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
31
Control Unit
 The brain of the microprocessor
 Manages the whole microprocessor
 Tasks include fetching instructions & data, storing data, managing input/output
devices
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
32
That was the structure, now let’s
talk about the language of a
microprocessor
Computer Organization and Architecture
33
Dr.Tarek Abdul Hameed
Instruction Set
 The set of machine instructions that a microprocessor recognizes and can execute– the only language microprocessor knows
 An instruction set includes low-level, a single step-at-a-time instructions, such as
add, subtract, multiply, and divide
 Eachmicroprocessor family has its unique instruction set
 Bigger instruction-sets mean more complex chips (higher costs, reduced
efficiency), but shorter programs
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
34
Instruction Set Architecture (ISA)
 Architecture is an interface between layers
 ISA is the interface between hardware and software
 ISA is what is visible to the programmer (and ISA might be different for O.S. and
applications)
 ISA consists of:
 instructions (operations and how they are encoded)
 information units (size, how they are addressed etc.)
 registers (or more generally processor state)
 input-output control
Computer Organization and Architecture
Dr.Tarek Abdul Hameed
35
Some Computer families
 Computers that have the same (or very similar) ISA
 Compatibility of software between various implementations
 IBM
 704, 709, 70xx etc.. From 1955 till 1965
 360, 370, 43xx, 33xx From 1965 to the present
 Power PC
 DEC
 PDP-11, VAX From 1970 till 1985
 Alpha (now Compaq, now HP) in 1990’s
Computer Organization and Architecture
36
Dr.Tarek Abdul Hameed
More computer families
 Intel
 Early micros 40xx in early 70’s
 x86 (086,…,486, Pentium, Pentium Pro, Pentium 3, Pentium 4) from 1980 on
 IA-64 (Itanium) in 2001
 SUN
 Sparc, Ultra Sparc 1985 0n
 MIPS-SGI
 Mips 2000, 3000, 4400, 10000 from 1985 on
Computer Organization and Architecture
37
Dr.Tarek Abdul Hameed
Information
 Basic unit is the bit (has value 0 or 1)
 Bits are grouped together in information units:
 Byte = 8 bits
 Word = 4 bytes
 Double word = 2 words
 etc.
Computer Organization and Architecture
38
Dr.Tarek Abdul Hameed
Addressing words
 Although machines are byte-addressable, words are the most commonly used
I-units
 Every word starts at an address divisible by 4
Word at address 0
Word at address 4
Word at address 8


Summarize English and Arabic text online

Summarize text automatically

Summarize English and Arabic text using the statistical algorithm and sorting sentences based on its importance

Download Summary

You can download the summary result with one of any available formats such as PDF,DOCX and TXT

Permanent URL

ٌYou can share the summary link easily, we keep the summary on the website for future reference,except for private summaries.

Other Features

We are working on adding new features to make summarization more easy and accurate

Latest summaries

دخلت أزمة المعل...

دخلت أزمة المعلمين في ساحل حضرموت مرحلة جديدة مع بدء إدارات التربية والتعليم تسليم إشعارات لمعلمي ال...

بحث عضو مجلس ال...

بحث عضو مجلس القيادة الرئاسي الدكتور عبدالله العليمي باوزير، في نيويورك، مع المديرة العامة لصندوق ال...

ما الذي يجعل ال...

ما الذي يجعل اللون يبدو فاتحًا أو داكنًا في العمل الفني؟ الذي يجعل اللون يبدو فاتحًا أو داكنًا في...

في 15 فبراير 19...

في 15 فبراير 1944، وبالتزامن مع إحدى أبشع الجرائم في التاريخ الحديث بحق المسلمين، وُلد أحد أعظم القا...

رغم الطابع الهز...

رغم الطابع الهزلي في النص، يحمل أبعادًا نقدية جادة تتعلق بانتقاد السلوك البشري والعبثية في النزاعات ...

تزداد أنصاف أقط...

تزداد أنصاف أقطار الذرات كلّما اتجهنا من أعلى المجموعة إلى أسفلها؛ حيث تُضاف إلكترونات إلى مستويات ا...

ضعف الروابط الأ...

ضعف الروابط الأسرية وغياب الزيارات المتبادلة، مع فقدان القدرة على بناء علاقات واقعية وتراجع التواصل ...

تصدر يوسف بزشكي...

تصدر يوسف بزشكيان، نجل الرئيس الإيراني مسعود بزشكيان، التفاعل على مواقع التواصل الاجتماعي في إيران، ...

جاء في الصبح ال...

جاء في الصبح المنّبي أنّ أبا الطيب قال: "وردت في صبايا من الكوفة إلى بغداد"، إلّا أنّه لم يحدد تاريخ...

نعم، جاءت الألف...

نعم، جاءت الألفاظ والعبارات ملائمة تماماً لتجسيد هذه العاطفة وصادقة في التعبير عنها.التعليل:قوة الأل...

تتسع رقعة الموا...

تتسع رقعة المواجهات بين القوات المسلحة اليمنية ومليشيات الحوثي التابعة لإيران في جبهات غرب تعز وشمال...

The technique i...

The technique involves measuring the diffraction patterns of X-rays as they interact with the materi...

Tech news