Download presentation
Presentation is loading. Please wait.
1
Today's Agenda What is Computer Architecture?
What is Computer Organization? Brief history of Computers Introduction to Binary Number Systems
2
Layers of Abstraction: from application program to execution of program
High Level Language main() { int i,b,c,a[10]; for (i=0; i<10; i++)… a[2] = b + c*i; } Compiler … lw r2, mem[r7] add r3, r4, r2 st r3, mem[r8] ISA Assembler
3
Where ISA is positioned in entire Abstraction layers
Application Operating System Compiler Firmware Instruction Set Architecture Instr Set Proc. I/O system Datapath & Control Digital Design Circuit Design Layout
4
Architecture Architecture is those attributes visible to the programmer Instruction set Number of bits used for data representation I/O mechanisms Memory addressing techniques Architecture Question: Is there a multiply/division instruction available?
5
Organization Organization is how features are implemented
Control signals Interfaces between computer and peripherals Memory technology used Organization Question: Is multiplication is implemented by separate hardware or is it done by repeated addition?
6
Architecture & Organization
All Intel x86 family share the same basic architecture The IBM System/360 family share the same basic architecture This gives code compatibility At least backwards Organization differs between different versions
7
Computer Architecture & Organization
Architecture refers to those attributes of the system visible to the programmer. Organization refers to the operational units and their interconnections. Examples of architectural attributes are Instruction set, number of bits used to represent datatypes like number, character etc Examples of organizational attributes are Processor design including control signals, register file, their interconnection. Memory Technology, interfaces between processor and I/O devices.
8
Example Processor: LC3 Addressability is 16 bit – 216 address space
8 Registers each 16 bit – it requires 3 bits to represent each register Opcode is 4 bit long – 16 different instructions can be there Addressing Modes Example instruction: ADD R3,R4,R2 – machine equivalent of ADD instruction
9
History of Computers
10
First Generation Computer: Vacuum Tubes
Decimal machine rather than a binary machine Mainly used for large calculations. It had to be programmed manually by setting switches and plugging and unplugging the cables. A ring of ten vacuum tubes represented each digit. Very large machines Vacuum Tube
11
First Generation Computer made of Vacuum tubes
12
Second Generation: Transistors
Made up of Silicon Silicon: Insulator It is made Semiconductor by Doping All the electronic devices are semiconductor devices And most of them are made up of transistors. Boolean logical gates are made of transistors. Combinational and sequential circuits – logic gates Integrated circuits – are made up of these circuits. Microprocessor is made up of these integrated circuits.
13
Moore’s Law Size of transistor is decreasing
Number of transistors are increasing exponentially. Moore’s Law: Number of transistors doubles every 18 months to 2years. Gordon Moore: Co-founder of Intel
14
Core 2 Duo (Conroe) 291 millions, July 2006
Moore’s Law Core 2 Duo (Conroe) 291 millions, July 2006 P4 Extreme Ed. 178 millions w/ 2MB L3 IBM POWER5 has 276 million transistors Intel Dual-Core Xeon (P4-based Tulsa) w/ 16MB unified L3: billion, 2006 42 millions 2,250 Exponential growth Transistor count will be doubled every 18 months Gordon Moore, Intel co-founder
15
Stored Program Concept
Von Neumann Model Program is first stored in the memory and each instruction is then executed one by one by the processor.
16
Third Generation: Integrated Circuits
In second generation, discrete components such as transistors , resistors etc were manufactured separately and soldered on the circuit board. This made the entire manufacturing process from transistor to circuit board cumbersome and expensive Then Integrated circuits were introduced. SSI circuits LSI circuits VSLI circuits Later generations used LSI, VLSI and new technology.
17
Number System Binary Number System Decimal Number System
Data Representation Number System Binary Number System Decimal Number System
18
What kinds of data do we need to represent?
Numbers – signed, unsigned, integers, floating point, complex, rational, irrational, … Text – characters, strings, … Images – pixels, colors, shapes, … Sound - numbers Logical – true, false Instructions – strings of characters 18
19
How do we represent data in a computer?
At the lowest level, a computer is an electronic machine. Works by controlling the flow of electrons Easy to recognize two conditions: Presence of a voltage – we’ll call this state “1” Absence of a voltage – we’ll call this state “0” 19
20
Computer is a binary digital system
Finite number of symbols Decimal Number system: 10 symbols, [0,9] Binary (base two) system: Has two symbols representing two stable states: 0 and 1 20
21
Physical devices used to store and process data in computers are two state devices like
semiconductor switches (ON/OFF) Magnetic surface alignment (N-S,S-N) Flip-flops ( low voltage, high voltage)
22
Bits and bytes Bits – binary digits (binary: only two possible values)
Byte – collection of bits 1 Byte = 8 Bits
23
Bits, Bytes, and Words A bit is a single binary digit (a 1 or 0).
A byte is 8 bits A word is 32 bits or 4 bytes Long word = 8 bytes = 64 bits Quad word = 16 bytes = 128 bits Programming languages use these standard number of bits when organizing data storage and access.
24
Bits, Bytes Unit Symbol Number of Bytes kilobyte KB 210 = 1024
MB 220 (over 1 million) GB 230 (over 1 billion) TB 240 (over 1 trillion) Unit Symbol Number of Bytes kilobyte megabyte gigabyte terabyte
25
Bit Permutations 1 bit 1 2 bits 00 01 10 11 3 bits 000 001 010 011 100 101 110 111 4 bits 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Each additional bit doubles the number of possible permutations
26
Representation of Numbers
Binary Numbers Unsigned Integers Signed Magnitude 1’s Complement 2’s Complement
27
Unsigned Integers 101 329 Weighted positional notation
like decimal numbers: “329” “3” is worth 300, because of its position, while “9” is only worth 9 101 22 21 20 1x4 + 0x2 + 1x1 = 5 most significant least 329 102 101 100 3x x10 + 9x1 = 329
28
Unsigned Integers (cont.)
An n-bit unsigned integer represents 2n values: from 0 to 2n-1. 22 21 20 1 2 3 4 5 6 7
29
Unsigned Binary Arithmetic
10111 + 111 11110 carry Base-2 addition – just like base 10 Add from right to left, propagating carry
30
Signed Integers With n bits, we have 2n distinct values.
Assign about half to positive integers (1 through 2n-1) and about half to negative (- 2n-1 through -1) That leaves two values: one for 0, and one extra
31
Representation of Signed Integers Cont…
Ex: n = 3 Signed magnitude
32
Positive integers Negative integers Inference
Just like unsigned : zero in most significant (MS) bit = 5 Negative integers Set MS bit to show negative, other bits are the same as unsigned = -5 Inference MS bit indicates sign: 0=positive, 1=negative
33
Question Given n bit string, What is the Maximum number we can represent in Signed Magnitude form? 1 . 2n-1 2n-2 22 21 20 The Max. value is : 2n-1 -1 The Min. value is : - 2n-1 -1 Ex: Given 5 bits, Max. number in signed magnitude form is: =15 Min. number in signed magnitude form is: = -15
34
1’s Complement Representation
Positive numbers representation is same as signed integers. Negative numbers represented by flipping all the bits of corresponding positive numbers For Example: +5 is represented as 00101 -5 is represented by 11010
35
Example: 1’s Complement
How we represent -12 in 1’s complement form Step1: Take +12 in binary representation Step2: Flip all the bits of the above
36
Inference -12 representation in 1’s complement form: 10011
37
Limitations! Problems with sign-magnitude and 1’s complement!
Two representations of zero (+0 and –0) Arithmetic circuits are complex to implement above representation
38
Two’s Complement Representation
If number is positive or zero Normal binary representation If number is negative Start with positive number Flip every bit (i.e., take the one’s complement) Then add one
39
Example: + 1 + 1 11011 (-5) 10111 (-9) 00101 (5) 01001 (9)
00101 (5) (9) 11010 (1’s comp) (1’s comp) 11011 (-5) (-9)
41
Advantage of 2’s complement
Two’s complement representation is developed to make circuits easy for arithmetic. For each positive number (X), assign value to its negative (-X), such that X + (-X) = 0 with “normal” addition, ignoring carry out 00101 (5) (9) (-5) (-9) 00000 (0) (0)
42
Example:2+(-3) Express -3 in 2’s complement form: 3 00011
1’s Complement of 3 2’s Complement of 3 i.e. -3 2 -3 11111
43
Interpret the result 11111 Look at MSB 1 the result is negative
What is the decimal equivalent of the result Take 2’s complement of 11111 Flip the bits to get 1’s complement 0000 Add 1, we get 0001, hence the number is -1
44
2’s Complement Signed Numbers
23 22 21 20 1 2 3 4 5 6 7 23 22 21 20 1 -8 -7 -6 -5 -4 -3 -2 -1
45
Base conversion Convert a number from one number system to another
Binary to Decimal and Decimal to Binary Decimal to Octal and Octal to Decimal Octal to Binary and Binary to Octal Binary to Hexadecimal and Hexadecimal to Binary
46
The Decimal Number System
The decimal number system is a positional number system. Example: X 100 = X 101 = 6 X 102 = 600 5 X 103 = 5000
47
The Decimal Number System
The decimal number system is also known as base 10. The values of the positions are calculated by taking 10 to some power. Why is the base 10 for decimal numbers? Because we use 10 digits, the digits 0 through 9.
48
The Binary Number System
Uses two symbols 0 and 1 to represent numbers Hence base 2
49
The Binary Number System (con’t)
The binary number system is also a positional numbering system. Example of a binary number and the values of the positions:
50
Total number of unique representations using n bits
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Total number of unique representations using n bits A sequence of n bits has 2n possible unique representations.
51
Converting from Binary to Decimal
X 20 = 1 X 21 = 0 1 X 22 = 4 20 = = X 23 = 8 21 = = X 24 = 0 22 = = X 25 = 0 23 = X 26 =
52
Converting from Binary to Decimal
Class Assignment: Binary Decimal 11101 100111 (1x24 + 1x23 + 1x22 + 0x21 + 1x20 ) = = 29
53
Converting Decimal Number to Binary Number
Make a list of the binary place values up to the number being converted. Perform successive divisions by 2, placing the remainder of 0 or 1 in each of the positions from right to left. Continue until the quotient is zero. Example: 5510
54
Procedure for decimal to binary conversion
2 | 55_ 1 (LSB) 2 | | 13_ 1 2 | 6_ 0 2 | 3_ 1 2 | 1_ 1 (MSB) 0
55
Converting From Decimal to Binary
Class Assignment Decimal Binary 82 107 -14 -329 (82)10=( )2 (107)10=( )2 (-14)10=(10010)2 (-329)10=( )2
56
HexaDecimal Number System
Base 16 16 distinct symbols 0-9,A,B,C,D,E,F Convert binary number to hexadecimal number
57
(624)8 Decimal to Octal Example Divide the magnitude by 8
Record the remainder Keep on dividing the quotient and record the remainders Write the remainders in reverse order Same as Decimal to Binary Conversion Example (404)10 (624)8
58
Octal to Decimal (6 X 82) + (2 X 81) + (4 X 80) Result is (404)10
Method is same as Binary to decimal conversion Only the base changes to 8 Verify previous example (624)8 (6 X 82) + (2 X 81) + (4 X 80) Result is (404)10
59
Octal to Binary (110010100)2 Method I Method II Example
Convert Octal to Decimal Then convert Decimal to Binary Method II Write 3-bit binary equivalent of each Octal digit in Octal Number Example (624)8 ( )2
60
Binary to Octal (624)8 Group bits (3-bit group) from right to left
Convert each 3- bit group to each Octal digit Example (624)8
61
Hexadecimal Number System
63
Exercise Convert Hexadecimal Number to Binary Number ADF6 DB69 CA36
5678 DABC
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.