Computer Organization and Architecture
Computer Organization and Architecture
Architecture
By Ghaleb alotaibi
Chapter 1
Classes of Computers:
Personal Computers(PC) :
General purpose, variety of software
Server computers:
Networks based
Supercomputers:
High-end scientific and engineering calculations
Highest capability
Embedded Computers:
Hidden as components of systems
Hundreds of dollars
Cloud Computing:
Warehouse Scale Computers (WSX)
Understanding Performance:
Algorithm : Determines number of operations executed
Processor and memory system : Determine how fast instructions are executed
I/O system (including OS) : Determine how fast I/O operations are executed
Computer architects must anticipate where the technology will be when the
design finishes rather than design for where it starts
This common sense advice implies that you know the common case is which
is only possible with careful experimentation and measurement
Hierarchy of memories:
Programmers want memory to be fast, large and cheap
Since any physical device can fail, we make systems dependable by including
redundant components, These extra components can take over when a failure
occurs and to help detect failures.
Assembly language:
textual representation of instruction
data
Components of a computer:
في اصغر المستويات في الكمبيوتر يتكون الجهاز من ثالث مكونات رئيسية وهي
Instruction Set Architecture (ISA) = WHAT the computer does (Logical view)
Structure: The way in which the components are interrelated. interrelated = ترابط
Arithmetic and logic unit (ALU): Performs the computer’s data processing
functions
Measurements :
Chapter 2
Includes the CPU view of memory, registers number and roles, etc.
The ISA is the contract between s/w and h/w , هي عبارة عن طبقة بين الهاردوير
والسوفت وير
ISA Categories
1. Operand Storage in the CPU
4. Operations
Design principles :
1. Simplicity favors regularity
2. Smaller is faster
Add and subtract, three operands Two sources and one destination
Register Zero:
More temporaries
Instruction Formats :
All instructions in MIPS are 32 wide
R-Type:
Immediate (l-type)
Byte Ordering
:عندنا نوعين ترتيب الترتيب الاول
Little Endian
وهو بكل بساطة الرجستر تقراء البياتات فيه من اليمين الى اليسار (اول بايت باليمين واخر
واحد باليسار)
ومن ناحية المومري تقراء البيانات فيه من اليسار الى اليمين (اول بايت باليسار واخر بايت
باليمين)
Big Endian
كل الرجستر والمومري تبداء من اليمين الى اليسار
Integer
Floating Point
Control flow
Jump
Conditional Branch
Recap:
Simpler is better
Smaller is faster
Chapter 3:
1. Executable Instructions
3. Assembler Directives
Comments:
.TEXT directive
.GLOBL directive
Global symbols can be referenced from other files and main function
.ASCII
Allocates a sequence of bytes for an
ASCII (string)
Memory Alignment:
Memory is viewed as an addressable array of bytes
Memory Alignment:
مثل مانشوف بالصورة انه كل مربع بالستاك له عنوان ويبدا ب 0وثم الي فوقه زاد
..عنه ب 4بايتس والي فوق زاد ب اربع وصار 8والخ
Syscall Services:
مهم ذا الجدول مرا
Data Transfer
Miscellaneous
طيب الان عرفنا اقسامها ف خلونا الان نجرب على هذي التعليمة ونبي بس نحدد وشهو ال
اوب كود و الـ ار اس والـ ار تي والـ ال ار دي
add $t1, $t2, $t3
الاوب عبارة عن ال ادد
ويوم نجي نحول الى باينري نكتب بالبداية الاوب كود وثم مسافة و الار اس وثم مسافة وثم
الار تي ومسافة وثم الار دي ومسافة وثم الشفت ومسافة وثم الفنك
وزي مانشوف بالصورة الي فوق انه كل جزء فوقه رقم وهذا عبارة عن طول الجزء
حلوين الان عرفنا اهم الاشياء الان نجي ونستعمل الجدول الي معطينا اياه الدكتور بالبالكبورد
ونشوف وشهو قيمة الباينري حقت ال اوب كود حق الادد
مثل مانشوف بالي مأشر بالاحمر انه الاد عبارة عن ستة اصفار ف نبداء التحويل حقنا ب 6اصفار
1010
ولكن طول رقم العشرة عبارة عن 4ارقام وبالصورة الي فوق حقة الا ار اس تقول 5ف نزيد 0
باليسار على شان ماناثر على قيمته
01010
000000 01010
الي فوق قيمة الباينري من الاوب كود الى الار دي ونجي عند الشفت بالجدول والي هو مأشر
بالاخضر وهو عبارة عن اصفار ف نحطها بشكل مباشر
ومثل مانالحظ انه طول البتات ذي 32مثل ماقرينا فوق انه مبس التعليمات حقتها عبارة عن
32بت
Shift Operations:
Shifting is to move the 32 bits of a number left or right
sll means shift left logical (insert zero from the right)
srl means shift right logical (insert zero from the left)