SlideShare a Scribd company logo
1 of 51
1
ComputerComputer ArchitectureArchitecture
andand
MicroprocessorMicroprocessor
Dr. V.Umadevi M.Sc(CS &IT). M.Tech (IT)., M.Phil., PhD., D.Litt.,Dr. V.Umadevi M.Sc(CS &IT). M.Tech (IT)., M.Phil., PhD., D.Litt.,
Director, Department of Computer Science, Jairams Arts andDirector, Department of Computer Science, Jairams Arts and
Science College, KarurScience College, Karur
Computer Architecture
& Microprocessor
22
Session ISession I
 Number SystemNumber System
 ConversionsConversions
 Binary OperationsBinary Operations
 CodeCode
 Logic GatesLogic Gates
 Boolean AlgebraBoolean Algebra
 Registers & CountersRegisters & Counters
 Computer LanguagesComputer Languages
Computer Architecture
& Microprocessor
33
Number SystemNumber System
Systematic representation of data in Numerical FormatSystematic representation of data in Numerical Format
 Decimal Number SystemDecimal Number System  0 to 90 to 9
 Binary Number SystemBinary Number System  0 and 10 and 1
 Octal Number SystemOctal Number System  0 to 70 to 7
 Hexa Decimal Number SystemHexa Decimal Number System  0 to 9 and A to F0 to 9 and A to F
Computer Architecture
& Microprocessor
44
Decimal Number SystemDecimal Number System
 Uses digits from 0 to 9.Uses digits from 0 to 9.
 Has a base of 10Has a base of 10
 Value of digit corresponds to its position in the numberValue of digit corresponds to its position in the number
number X (base)number X (base)position-1position-1
 Example :Example :
4954951010 , 84, 841010
Computer Architecture
& Microprocessor
55
Binary Number SystemBinary Number System
 Computer uses the Binary Number SystemComputer uses the Binary Number System
 Consists of numbers 0 and 1Consists of numbers 0 and 1
 Bit (Bit (BBinary diginary digitit))
 Byte (8 - bits)Byte (8 - bits)
 Example:Example:
1010101022 , 1110, 111022
Computer Architecture
& Microprocessor
66
Octal Number SystemOctal Number System
 Uses the digits from 0 to 7.Uses the digits from 0 to 7.
 Has a base of 8Has a base of 8
 can be represented by a group of 3 bitscan be represented by a group of 3 bits
 Example:Example:
12312388 , 435, 43588
Computer Architecture
& Microprocessor
77
Hexa Decimal Number SystemHexa Decimal Number System
 Uses the digits from 0 to 15.Uses the digits from 0 to 15.
 Numbers from 10 to 15 represented by alphabets A through FNumbers from 10 to 15 represented by alphabets A through F
 Has a base of 16Has a base of 16
 Can be represented by a group of 4 bits.Can be represented by a group of 4 bits.
 Example:Example:
B3A1B3A11616 , 98C, 98C1616
Computer Architecture
& Microprocessor
88
Number System TableNumber System Table
DecimalDecimal
NumberNumber
SystemSystem
BinaryBinary
NumberNumber
SystemSystem
Octal NumberOctal Number
SystemSystem
Hexa DecimalHexa Decimal
NumberNumber
SystemSystem
00
11
22
33
44
55
66
77
88
99
1010
1111
1212
1313
1414
1515
00000000
00010001
00100010
00110011
01000100
01010101
01100110
01110111
10001000
10011001
10101010
10111011
11001100
11011101
11101110
11111111
00
11
22
33
44
55
66
77
1010
1111
1212
1313
1414
1515
1616
1717
00
11
22
33
44
55
66
77
88
99
AA
BB
CC
DD
EE
FF
Computer Architecture
& Microprocessor
99
Conversion of decimal Number to Hexadecimal NumberConversion of decimal Number to Hexadecimal Number
 To convert, divide the decimal number by 16 successivelyTo convert, divide the decimal number by 16 successively
ExampleExample
To convert 540 to decimalTo convert 540 to decimal
16 54016 540
16 33 -1216 33 -12
2 - 12 - 1
The decimal equivalent of 540The decimal equivalent of 5401010 = 21C= 21C1616
Computer Architecture
& Microprocessor
1010
Conversion from Hexadecimal to DecimalConversion from Hexadecimal to Decimal
 Multiply the digits of the number by the powers of 16 and addMultiply the digits of the number by the powers of 16 and add
ExampleExample
 To convert 21CTo convert 21C1616 to its decimal equivalentto its decimal equivalent
2 1 C
C X160
= 12 X 1 = 12
1 X161
= 1 X 16 = 16
2 X162
= 2 X 256= 512
540
Computer Architecture
& Microprocessor
1111
Conversion of Hexadecimal to Binary NumberConversion of Hexadecimal to Binary Number
 The binary equivalent of each digit is usedThe binary equivalent of each digit is used
ExampleExample
 To convert 5BTo convert 5B1616 to binary equivalent:to binary equivalent:
5 B5 B
010110110101101122
 To convert B316 to binary equivalent:To convert B316 to binary equivalent:
B 3B 3
101100111011001122
Computer Architecture
& Microprocessor
1212
Conversion of Binary to Decimal NumberConversion of Binary to Decimal Number
 Sum of product of each digit with 2 raised to the powerSum of product of each digit with 2 raised to the power
of positional valueof positional value
Example:Example:
To find the decimal equivalent of 1011To find the decimal equivalent of 101122 ::
Computer Architecture
& Microprocessor
1313
Conversion from Octal to DecimalConversion from Octal to Decimal
 Multiply the digits of the number by the powers of 8 and addMultiply the digits of the number by the powers of 8 and add
ExampleExample
 To convert 215To convert 21588 to its decimal equivalentto its decimal equivalent
2 1 5
5 X 80
= 5 X 1 = 5
1 X 81
= 1 X 8 = 8
2 X 82
= 2 X 64= 128
141
Computer Architecture
& Microprocessor
1414
9’s Complement9’s Complement
 Difference of each digit of a number from 9Difference of each digit of a number from 9
Example:Example:
 To find 9’s complement ofTo find 9’s complement of 5454 ::
9 99 9
5 45 4
4 54 5
Computer Architecture
& Microprocessor
1515
10’s Complement10’s Complement
 Equivalent to the negative of a numberEquivalent to the negative of a number
 Obtained by adding 1 to the 9’s complement of a numberObtained by adding 1 to the 9’s complement of a number
Example:Example:
 To find 10’s complement of 54To find 10’s complement of 54
= 9’s complement of 54 + 1= 9’s complement of 54 + 1
= 45 + 1= 45 + 1
== 4646
Computer Architecture
& Microprocessor
1616
1’s Complement of binary number1’s Complement of binary number
 Similar to 9’s complement of decimal numberSimilar to 9’s complement of decimal number
 Obtained by subtracting each digit from 1Obtained by subtracting each digit from 1
ExampleExample
 To find 1’s complement of 101To find 1’s complement of 101
1 1 11 1 1
1 0 11 0 1
0 1 00 1 0
Computer Architecture
& Microprocessor
1717
2’s complement of a binary number2’s complement of a binary number
 Equivalent to 10’s complement of a decimal numberEquivalent to 10’s complement of a decimal number
 Represents the negative equivalent of that numberRepresents the negative equivalent of that number
ExampleExample
 To find the 2’s complement of 1010To find the 2’s complement of 1010
= 1’s complement of 1010 + 1= 1’s complement of 1010 + 1
= 0101 + 1= 0101 + 1
== 01100110
Computer Architecture
& Microprocessor
1818
Binary SubtractionBinary Subtraction
To subtractTo subtract 10101010 fromfrom 11001100
 Find 2’s complement of 1010Find 2’s complement of 1010
NumberNumber : 1010: 1010
1’s complement1’s complement : 0101: 0101
2’s complement2’s complement : 0110: 0110
 Add 2’s complement of 1010 with 1100Add 2’s complement of 1010 with 1100
11001100
01100110
00100010
Computer Architecture
& Microprocessor
1919
BCDBCD
 Each digit is represented by four bitsEach digit is represented by four bits
Decimal NumberDecimal Number BCDBCD
88 0000100000001000
99 0000100100001001
1010 0001000000010000
1111 0001000100010001
1212 0001001000010010
1313 0001001100010011
1414 0001010000010100
1515 0001010100010101
Decimal NumberDecimal Number BCDBCD
00 00000000
11 00010001
22 00100010
33 00110011
44 01000100
55 01010101
66 01100110
77 01110111
Computer Architecture
& Microprocessor
2020
Gray CodeGray Code
 Only one bit changes for each consecutive numbersOnly one bit changes for each consecutive numbers
Decimal NumberDecimal Number Gray CodeGray Code
88 11001100
99 11011101
1010 11111111
1111 11101110
1212 10101010
1313 10111011
1414 10011001
1515 10001000
Decimal NumberDecimal Number Gray CodeGray Code
00 00000000
11 00010001
22 00110011
33 00100010
44 01100110
55 01110111
66 01010101
77 01000100
Computer Architecture
& Microprocessor
2121
ASCII CodesASCII Codes
 American Standard Code for Information InterchangeAmerican Standard Code for Information Interchange
 7 bit code7 bit code
 Represents upto 128 charactersRepresents upto 128 characters
 First 3 bits-zone bitsFirst 3 bits-zone bits
 Second 4 bits-numeric bitsSecond 4 bits-numeric bits
Computer Architecture
& Microprocessor
2222
ASCII CodesASCII Codes
ASCII Code Character
00 NUL
01 SOH
02 STX
03 ETX
04 EOT
05 ENQ
06 ACK
07 BEL
08 BS
09 HT
0A LF
0B VT
0C FF
0D CR
0E S1
0F S0
10 DLE
ASCII Code Character
11 DC1 (X-on)
12 DC2 (Tape)
13 DC3 (X-off)
14 DC4
15 NAK
16 SYN
17 ETB
18 CAN
19 EM
1A SUB
1B ESC
1C FS
1D GS
1E RS
1F US
20 SP
21 !
Computer Architecture
& Microprocessor
2323
ASCII CodeASCII Code
ASCII Code Character
22 “
23 #
24 $
25 %
26 &
27 ‘
28 (
29 )
2A *
2B +
2C ,
2D -
2E .
2F /
30 0
31 1
ASCII Code Character
32 2
33 3
34 4
35 5
36 6
37 7
38 8
39 9
3A :
3B ;
3C <
3D =
3E >
3F ?
40 @
41 A
Computer Architecture
& Microprocessor
2424
ASCII Code Character
42 B
43 C
44 D
45 E
46 F
47 G
48 H
49 I
4A J
4B K
4C L
4D M
4E N
4F O
50 P
51 Q
52 R
53 S
54 T
55 U
ASCII Characters
56 V
57 W
58 X
59 Y
5A Z
5B [
5C 
5D ]
5E ^ ( )
5F - ( )
61 a
62 b
63 c
64 d
65 e
66 f
67 g
69 h
6A i
6B j
Computer Architecture
& Microprocessor
2525
ASCII Code Character
6B k
6C l
6D m
6E n
6F o
70 p
71 q
72 r
73 s
74 t
75 u
76 v
77 w
78 x
79 y
7A z
7B {
7C |
7D }
7E ~
7F DEL
Computer Architecture
& Microprocessor
2626
ASCII -8 CodeASCII -8 Code
 Uses 8 bit codeUses 8 bit code
 Represents upto 256 charactersRepresents upto 256 characters
 First 4 bits-zone bitsFirst 4 bits-zone bits
 Second 4 bits-numeric bitsSecond 4 bits-numeric bits
Computer Architecture
& Microprocessor
2727
Logic GatesLogic Gates
NOT gateNOT gate or Inverteror Inverter
 output is opposite of inputoutput is opposite of input
 Truth TableTruth Table
I/P 0/PI/P 0/P
0 10 1
1 01 0
I/P O/P
Computer Architecture
& Microprocessor
2828
AND GateAND Gate
Truth TableTruth Table
I/P1I/P1 I/P2I/P2 O/PO/P
00 00 00
00 11 00
11 00 00
11 11 11
I/P1
I/P2
O/P
Computer Architecture
& Microprocessor
2929
NAND GateNAND Gate
Truth TableTruth Table
I/P1I/P1 I/P2I/P2 O/PO/P
00 00 11
00 11 11
11 00 11
11 11 00
I/P1
I/P2
O/P
Computer Architecture
& Microprocessor
3030
OR GateOR Gate
Truth TableTruth Table
I/P1I/P1 I/P2I/P2 O/PO/P
00 00 00
00 11 11
11 00 11
11 11 11
I/P1
I/P2
O/P
Computer Architecture
& Microprocessor
3131
NOR GateNOR Gate
Truth TableTruth Table
I/P1I/P1 I/P2I/P2 O/PO/P
00 00 11
00 11 00
11 00 00
11 11 00
I/P1
I/P2
O/P
Computer Architecture
& Microprocessor
3232
XOR GateXOR Gate
Truth TableTruth Table
I/P1I/P1 I/P2I/P2 O/PO/P
00 00 00
00 11 11
11 00 11
11 11 00
I/P1
I/P2
O/P
Computer Architecture
& Microprocessor
3333
XNOR GateXNOR Gate
Truth TableTruth Table
I/P1I/P1 I/P2I/P2 O/PO/P
00 00 11
00 11 00
11 00 00
11 11 11
I/P1
I/P2
O/P
Computer Architecture
& Microprocessor
3434
Boolean AlgebraBoolean Algebra
 Algebra of binary values(1 & 0)Algebra of binary values(1 & 0)
 Types of operationsTypes of operations
 OR (+)OR (+)
 AND ( . )AND ( . )
 NOT (- or ‘ )NOT (- or ‘ )
 Minimizes the basic circuits to perform digital operationsMinimizes the basic circuits to perform digital operations
Computer Architecture
& Microprocessor
3535
Algebraic TheoremsAlgebraic Theorems
OR LawsOR Laws
• A + 0 = AA + 0 = A
• A + 1 =1A + 1 =1
• A + A = AA + A = A
• A + A = 1A + A = 1
AND LawsAND Laws
• A . 0 = 0A . 0 = 0
• A . 1 = AA . 1 = A
• A . A = AA . A = A
• A . A = 0A . A = 0
Computer Architecture
& Microprocessor
3636
Laws of ComplementationLaws of Complementation
 A = AA = A
 1 = 01 = 0
 0 = 10 = 1
 If A=0, then A =1If A=0, then A =1
 If A=1, then A = 0If A=1, then A = 0
Commutative LawsCommutative Laws
 A + B = B + AA + B = B + A
 A .B = B .AA .B = B .A
Associative LawsAssociative Laws
 (A + B) + C = A + (B + C) = A + B + C(A + B) + C = A + (B + C) = A + B + C
 (A.B).C = A.(B.C) = A.B.C(A.B).C = A.(B.C) = A.B.C
Computer Architecture
& Microprocessor
3737
Distributive LawsDistributive Laws
 A . (B+C) = A .B + A .CA . (B+C) = A .B + A .C
 A + B.C = (A + B) . (A + C)A + B.C = (A + B) . (A + C)
Other ExpressionsOther Expressions
 A + AB = AA + AB = A
 A . (A + B) = AA . (A + B) = A
 A + AB = A + BA + AB = A + B
 A . (A + B) = ABA . (A + B) = AB
 AB + AB = AAB + AB = A
 (A + B)(A + B) = A(A + B)(A + B) = A
 AB + AC = (A + C) . (A + B)AB + AC = (A + C) . (A + B)
 (A + B) ( A + C) = AC + AB(A + B) ( A + C) = AC + AB
 AB + AC + BC = AB + ACAB + AC + BC = AB + AC
 (A + B)(A + C)(B + C) = (A + B)(A + C)(A + B)(A + C)(B + C) = (A + B)(A + C)
Computer Architecture
& Microprocessor
3838
Half Adder
Has two inputs (the bits to be summed)
Has two outputs (the sum bit and the carry bit)
AB CD
00
01
10
11
00
10
10
01
Computer Architecture
& Microprocessor
3939
an
bn
cn
 
sn
cn+1
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Full Adder – Truth Table
Computer Architecture
& Microprocessor
4040
7 Segment LED Display
Computer Architecture
& Microprocessor
4141
Computer Architecture
& Microprocessor
4242
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
1 1 1 1 1 1 0
0 1 1 0 0 0 0
1 1 0 1 1 0 1
1 1 1 1 0 0 1
0 1 1 0 0 1 1
1 0 1 1 0 1 1
1 0 1 1 1 1 1
1 1 1 0 0 0 0
1 1 1 1 1 1 1
1 1 1 1 0 1 1
INPUTS
X Y Z W A B C D E F G
OUTPUT
L
E
G
A
L
D
I
G
I
T
S
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
1 0 0 1 1 1 1
1 0 0 1 1 1 1
1 0 0 1 1 1 1
1 0 0 1 1 1 1
1 0 0 1 1 1 1
1 0 0 1 1 1 1
E
R
R
O
R
7 Segment LED Display– Truth Table
Computer Architecture
& Microprocessor
4343
TTL CircuitTTL Circuit
 Stands for transistor - transistor logic.Stands for transistor - transistor logic.

Operates between cut-off and saturation.Operates between cut-off and saturation.
 Advantages:Advantages:
• SpeedSpeed
• good fan – in and fan – outgood fan – in and fan – out
• easy interface with other digital circuitryeasy interface with other digital circuitry
Computer Architecture
& Microprocessor
4444
Flip FlopFlip Flop
 Stores a binary digitStores a binary digit
 Stable till a signal switches itStable till a signal switches it
 Types of Types of flip flopTypes of Types of flip flop
 S-R flip flopS-R flip flop
 J-K flip flopJ-K flip flop
 D flip flopD flip flop
 T flip flopT flip flop
Computer Architecture
& Microprocessor
4545
RegistersRegisters
 Group of flip-flopsGroup of flip-flops
 Connected in parallelConnected in parallel
 D flip-flop commonly usedD flip-flop commonly used
Shift RegisterShift Register
 Shifts content unchangedShifts content unchanged
 Temporary storageTemporary storage
 Types:Types:
 Serial-in, serial-outSerial-in, serial-out
 Serial-in, parallel-outSerial-in, parallel-out
 Parallel in, serial-outParallel in, serial-out
 Parallel in, parallel outParallel in, parallel out
Computer Architecture
& Microprocessor
4646
CountersCounters
 Counts no. of pulsesCounts no. of pulses
 Modulus of CounterModulus of Counter
• Binary CounterBinary Counter
• Decade CounterDecade Counter
• Pre settable CounterPre settable Counter
Binary CounterBinary Counter
J
k
Q
Q
J
k
Q
Q
J
k
Q
Q
J
k
Q
Q
CLK
3 2 1 0
Computer Architecture
& Microprocessor
4747
 Types of CountersTypes of Counters
 Up CounterUp Counter
 Down CounterDown Counter
 Up-Down CounterUp-Down Counter
 Controlled CounterControlled Counter
 Ring CounterRing Counter
Synchronous
Asynchronous
Computer Architecture
& Microprocessor
4848
Computer LanguagesComputer Languages
 Machine LanguageMachine Language
–– 0 and 10 and 1
 Assembly LanguageAssembly Language
–– mnemonicsmnemonics
–– assemblerassembler
 High Level LanguageHigh Level Language
–– English like languageEnglish like language
–– Interpreters and CompilersInterpreters and Compilers
Computer Architecture
& Microprocessor
4949
Execution of Assembly Language programExecution of Assembly Language program
Source Program
Assembler
Object Program
Loader
Floppy Disk
Floppy Disk
 One to One Translation
Computer Architecture
& Microprocessor
5050
Execution of High Level LanguageExecution of High Level Language
Source Code
Translator
Object Code 1 Object Code 2 Object Code 3
 One to Many Translation
Computer Architecture
& Microprocessor
5151
Compiler & InterpreterCompiler & Interpreter
 Interpreter translates line by lineInterpreter translates line by line
- Slower- Slower
 Compiler translates the entire codeCompiler translates the entire code
- faster- faster

More Related Content

What's hot

FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...Arti Parab Academics
 
Lec 02 data representation part 1
Lec 02 data representation part 1Lec 02 data representation part 1
Lec 02 data representation part 1Abdul Khan
 
data representation
 data representation data representation
data representationHaroon_007
 
Data Reprersentation
Data Reprersentation  Data Reprersentation
Data Reprersentation Kamal Acharya
 
DLD Presentation By Team Reboot,Rafin Rayan,EUB
DLD Presentation By Team Reboot,Rafin Rayan,EUBDLD Presentation By Team Reboot,Rafin Rayan,EUB
DLD Presentation By Team Reboot,Rafin Rayan,EUBRafin Rayan
 
Chapter 06 boolean algebra
Chapter 06 boolean algebraChapter 06 boolean algebra
Chapter 06 boolean algebraIIUI
 
digital logic design number system
digital logic design number systemdigital logic design number system
digital logic design number systemNallapati Anindra
 
Mcs 012 computer organisation and assemly language programming- ignou assignm...
Mcs 012 computer organisation and assemly language programming- ignou assignm...Mcs 012 computer organisation and assemly language programming- ignou assignm...
Mcs 012 computer organisation and assemly language programming- ignou assignm...Dr. Loganathan R
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIEr. Nawaraj Bhandari
 
Lec 02 data representation part 2
Lec 02 data representation part 2Lec 02 data representation part 2
Lec 02 data representation part 2Abdul Khan
 

What's hot (20)

Number Systems
Number  SystemsNumber  Systems
Number Systems
 
Digital Search Tree
Digital Search TreeDigital Search Tree
Digital Search Tree
 
Digital search tree
Digital search treeDigital search tree
Digital search tree
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
 
Lec 02 data representation part 1
Lec 02 data representation part 1Lec 02 data representation part 1
Lec 02 data representation part 1
 
Digital Logic & Design
Digital Logic & DesignDigital Logic & Design
Digital Logic & Design
 
Data Representation
Data RepresentationData Representation
Data Representation
 
data representation
 data representation data representation
data representation
 
Data Reprersentation
Data Reprersentation  Data Reprersentation
Data Reprersentation
 
Number Systems
Number SystemsNumber Systems
Number Systems
 
Mcs 012 soved assignment 2015-16
Mcs 012 soved assignment 2015-16Mcs 012 soved assignment 2015-16
Mcs 012 soved assignment 2015-16
 
Number system
Number systemNumber system
Number system
 
DLD Presentation By Team Reboot,Rafin Rayan,EUB
DLD Presentation By Team Reboot,Rafin Rayan,EUBDLD Presentation By Team Reboot,Rafin Rayan,EUB
DLD Presentation By Team Reboot,Rafin Rayan,EUB
 
dld 01-introduction
dld 01-introductiondld 01-introduction
dld 01-introduction
 
Chapter 06 boolean algebra
Chapter 06 boolean algebraChapter 06 boolean algebra
Chapter 06 boolean algebra
 
digital logic design number system
digital logic design number systemdigital logic design number system
digital logic design number system
 
Mcs 012 computer organisation and assemly language programming- ignou assignm...
Mcs 012 computer organisation and assemly language programming- ignou assignm...Mcs 012 computer organisation and assemly language programming- ignou assignm...
Mcs 012 computer organisation and assemly language programming- ignou assignm...
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
Number system
Number systemNumber system
Number system
 
Lec 02 data representation part 2
Lec 02 data representation part 2Lec 02 data representation part 2
Lec 02 data representation part 2
 

Similar to computer architecture

Chapter 1 Digital Systems and Binary Numbers.ppt
Chapter 1 Digital Systems and Binary Numbers.pptChapter 1 Digital Systems and Binary Numbers.ppt
Chapter 1 Digital Systems and Binary Numbers.pptAparnaDas827261
 
Chapter 1 digital design.pptx
Chapter 1 digital design.pptxChapter 1 digital design.pptx
Chapter 1 digital design.pptxAliaaTarek5
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mpMSc CST
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversionsSusantha Herath
 
Lec 01 - Microcomputer Architecture and Logic Design
Lec 01 - Microcomputer Architecture and Logic DesignLec 01 - Microcomputer Architecture and Logic Design
Lec 01 - Microcomputer Architecture and Logic DesignVajira Thambawita
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptxGobinathAECEJRF1101
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxMinahilUmar1
 
UNIT-I U20EST109 - PROBLEM SOLVING APPROACH - Copy (1).pptx
UNIT-I U20EST109 - PROBLEM SOLVING APPROACH - Copy (1).pptxUNIT-I U20EST109 - PROBLEM SOLVING APPROACH - Copy (1).pptx
UNIT-I U20EST109 - PROBLEM SOLVING APPROACH - Copy (1).pptxKaameshwaranKaameshw
 
Mazidi Presentation.pdf
Mazidi Presentation.pdfMazidi Presentation.pdf
Mazidi Presentation.pdfKhabibConor
 
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptChapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptDavid Louie Bedia
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1Deepak John
 

Similar to computer architecture (20)

DLD-Introduction.pptx
DLD-Introduction.pptxDLD-Introduction.pptx
DLD-Introduction.pptx
 
Chapter 1 Digital Systems and Binary Numbers.ppt
Chapter 1 Digital Systems and Binary Numbers.pptChapter 1 Digital Systems and Binary Numbers.ppt
Chapter 1 Digital Systems and Binary Numbers.ppt
 
Chapter 1 digital design.pptx
Chapter 1 digital design.pptxChapter 1 digital design.pptx
Chapter 1 digital design.pptx
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mp
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversions
 
Lec 01 - Microcomputer Architecture and Logic Design
Lec 01 - Microcomputer Architecture and Logic DesignLec 01 - Microcomputer Architecture and Logic Design
Lec 01 - Microcomputer Architecture and Logic Design
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
 
21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx21EC201– Digital Principles and system design.pptx
21EC201– Digital Principles and system design.pptx
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptx
 
DCF QNA edited
DCF QNA editedDCF QNA edited
DCF QNA edited
 
UNIT-I U20EST109 - PROBLEM SOLVING APPROACH - Copy (1).pptx
UNIT-I U20EST109 - PROBLEM SOLVING APPROACH - Copy (1).pptxUNIT-I U20EST109 - PROBLEM SOLVING APPROACH - Copy (1).pptx
UNIT-I U20EST109 - PROBLEM SOLVING APPROACH - Copy (1).pptx
 
Mazidi Presentation.pdf
Mazidi Presentation.pdfMazidi Presentation.pdf
Mazidi Presentation.pdf
 
DATA REPRESENTATION
DATA  REPRESENTATIONDATA  REPRESENTATION
DATA REPRESENTATION
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Datarepresentation2
Datarepresentation2Datarepresentation2
Datarepresentation2
 
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptChapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
 
Ch3
Ch3Ch3
Ch3
 

More from Dr.Umadevi V

computer architecture 4
computer architecture 4 computer architecture 4
computer architecture 4 Dr.Umadevi V
 
Computer architecture 3
Computer architecture 3Computer architecture 3
Computer architecture 3Dr.Umadevi V
 
computer architecture
computer architecture computer architecture
computer architecture Dr.Umadevi V
 
Multiple access techniques for wireless communication
Multiple access techniques for wireless communicationMultiple access techniques for wireless communication
Multiple access techniques for wireless communicationDr.Umadevi V
 

More from Dr.Umadevi V (12)

Data Structures 8
Data Structures 8Data Structures 8
Data Structures 8
 
Data Structures 7
Data Structures 7Data Structures 7
Data Structures 7
 
Data Structures 6
Data Structures 6Data Structures 6
Data Structures 6
 
Data Structures 5
Data Structures 5Data Structures 5
Data Structures 5
 
Data Structures 4
Data Structures 4Data Structures 4
Data Structures 4
 
Data Structures 3
Data Structures 3Data Structures 3
Data Structures 3
 
Data Structures 2
Data Structures 2Data Structures 2
Data Structures 2
 
Data Structures
Data StructuresData Structures
Data Structures
 
computer architecture 4
computer architecture 4 computer architecture 4
computer architecture 4
 
Computer architecture 3
Computer architecture 3Computer architecture 3
Computer architecture 3
 
computer architecture
computer architecture computer architecture
computer architecture
 
Multiple access techniques for wireless communication
Multiple access techniques for wireless communicationMultiple access techniques for wireless communication
Multiple access techniques for wireless communication
 

Recently uploaded

History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 

Recently uploaded (20)

History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 

computer architecture

  • 1. 1 ComputerComputer ArchitectureArchitecture andand MicroprocessorMicroprocessor Dr. V.Umadevi M.Sc(CS &IT). M.Tech (IT)., M.Phil., PhD., D.Litt.,Dr. V.Umadevi M.Sc(CS &IT). M.Tech (IT)., M.Phil., PhD., D.Litt., Director, Department of Computer Science, Jairams Arts andDirector, Department of Computer Science, Jairams Arts and Science College, KarurScience College, Karur
  • 2. Computer Architecture & Microprocessor 22 Session ISession I  Number SystemNumber System  ConversionsConversions  Binary OperationsBinary Operations  CodeCode  Logic GatesLogic Gates  Boolean AlgebraBoolean Algebra  Registers & CountersRegisters & Counters  Computer LanguagesComputer Languages
  • 3. Computer Architecture & Microprocessor 33 Number SystemNumber System Systematic representation of data in Numerical FormatSystematic representation of data in Numerical Format  Decimal Number SystemDecimal Number System  0 to 90 to 9  Binary Number SystemBinary Number System  0 and 10 and 1  Octal Number SystemOctal Number System  0 to 70 to 7  Hexa Decimal Number SystemHexa Decimal Number System  0 to 9 and A to F0 to 9 and A to F
  • 4. Computer Architecture & Microprocessor 44 Decimal Number SystemDecimal Number System  Uses digits from 0 to 9.Uses digits from 0 to 9.  Has a base of 10Has a base of 10  Value of digit corresponds to its position in the numberValue of digit corresponds to its position in the number number X (base)number X (base)position-1position-1  Example :Example : 4954951010 , 84, 841010
  • 5. Computer Architecture & Microprocessor 55 Binary Number SystemBinary Number System  Computer uses the Binary Number SystemComputer uses the Binary Number System  Consists of numbers 0 and 1Consists of numbers 0 and 1  Bit (Bit (BBinary diginary digitit))  Byte (8 - bits)Byte (8 - bits)  Example:Example: 1010101022 , 1110, 111022
  • 6. Computer Architecture & Microprocessor 66 Octal Number SystemOctal Number System  Uses the digits from 0 to 7.Uses the digits from 0 to 7.  Has a base of 8Has a base of 8  can be represented by a group of 3 bitscan be represented by a group of 3 bits  Example:Example: 12312388 , 435, 43588
  • 7. Computer Architecture & Microprocessor 77 Hexa Decimal Number SystemHexa Decimal Number System  Uses the digits from 0 to 15.Uses the digits from 0 to 15.  Numbers from 10 to 15 represented by alphabets A through FNumbers from 10 to 15 represented by alphabets A through F  Has a base of 16Has a base of 16  Can be represented by a group of 4 bits.Can be represented by a group of 4 bits.  Example:Example: B3A1B3A11616 , 98C, 98C1616
  • 8. Computer Architecture & Microprocessor 88 Number System TableNumber System Table DecimalDecimal NumberNumber SystemSystem BinaryBinary NumberNumber SystemSystem Octal NumberOctal Number SystemSystem Hexa DecimalHexa Decimal NumberNumber SystemSystem 00 11 22 33 44 55 66 77 88 99 1010 1111 1212 1313 1414 1515 00000000 00010001 00100010 00110011 01000100 01010101 01100110 01110111 10001000 10011001 10101010 10111011 11001100 11011101 11101110 11111111 00 11 22 33 44 55 66 77 1010 1111 1212 1313 1414 1515 1616 1717 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF
  • 9. Computer Architecture & Microprocessor 99 Conversion of decimal Number to Hexadecimal NumberConversion of decimal Number to Hexadecimal Number  To convert, divide the decimal number by 16 successivelyTo convert, divide the decimal number by 16 successively ExampleExample To convert 540 to decimalTo convert 540 to decimal 16 54016 540 16 33 -1216 33 -12 2 - 12 - 1 The decimal equivalent of 540The decimal equivalent of 5401010 = 21C= 21C1616
  • 10. Computer Architecture & Microprocessor 1010 Conversion from Hexadecimal to DecimalConversion from Hexadecimal to Decimal  Multiply the digits of the number by the powers of 16 and addMultiply the digits of the number by the powers of 16 and add ExampleExample  To convert 21CTo convert 21C1616 to its decimal equivalentto its decimal equivalent 2 1 C C X160 = 12 X 1 = 12 1 X161 = 1 X 16 = 16 2 X162 = 2 X 256= 512 540
  • 11. Computer Architecture & Microprocessor 1111 Conversion of Hexadecimal to Binary NumberConversion of Hexadecimal to Binary Number  The binary equivalent of each digit is usedThe binary equivalent of each digit is used ExampleExample  To convert 5BTo convert 5B1616 to binary equivalent:to binary equivalent: 5 B5 B 010110110101101122  To convert B316 to binary equivalent:To convert B316 to binary equivalent: B 3B 3 101100111011001122
  • 12. Computer Architecture & Microprocessor 1212 Conversion of Binary to Decimal NumberConversion of Binary to Decimal Number  Sum of product of each digit with 2 raised to the powerSum of product of each digit with 2 raised to the power of positional valueof positional value Example:Example: To find the decimal equivalent of 1011To find the decimal equivalent of 101122 ::
  • 13. Computer Architecture & Microprocessor 1313 Conversion from Octal to DecimalConversion from Octal to Decimal  Multiply the digits of the number by the powers of 8 and addMultiply the digits of the number by the powers of 8 and add ExampleExample  To convert 215To convert 21588 to its decimal equivalentto its decimal equivalent 2 1 5 5 X 80 = 5 X 1 = 5 1 X 81 = 1 X 8 = 8 2 X 82 = 2 X 64= 128 141
  • 14. Computer Architecture & Microprocessor 1414 9’s Complement9’s Complement  Difference of each digit of a number from 9Difference of each digit of a number from 9 Example:Example:  To find 9’s complement ofTo find 9’s complement of 5454 :: 9 99 9 5 45 4 4 54 5
  • 15. Computer Architecture & Microprocessor 1515 10’s Complement10’s Complement  Equivalent to the negative of a numberEquivalent to the negative of a number  Obtained by adding 1 to the 9’s complement of a numberObtained by adding 1 to the 9’s complement of a number Example:Example:  To find 10’s complement of 54To find 10’s complement of 54 = 9’s complement of 54 + 1= 9’s complement of 54 + 1 = 45 + 1= 45 + 1 == 4646
  • 16. Computer Architecture & Microprocessor 1616 1’s Complement of binary number1’s Complement of binary number  Similar to 9’s complement of decimal numberSimilar to 9’s complement of decimal number  Obtained by subtracting each digit from 1Obtained by subtracting each digit from 1 ExampleExample  To find 1’s complement of 101To find 1’s complement of 101 1 1 11 1 1 1 0 11 0 1 0 1 00 1 0
  • 17. Computer Architecture & Microprocessor 1717 2’s complement of a binary number2’s complement of a binary number  Equivalent to 10’s complement of a decimal numberEquivalent to 10’s complement of a decimal number  Represents the negative equivalent of that numberRepresents the negative equivalent of that number ExampleExample  To find the 2’s complement of 1010To find the 2’s complement of 1010 = 1’s complement of 1010 + 1= 1’s complement of 1010 + 1 = 0101 + 1= 0101 + 1 == 01100110
  • 18. Computer Architecture & Microprocessor 1818 Binary SubtractionBinary Subtraction To subtractTo subtract 10101010 fromfrom 11001100  Find 2’s complement of 1010Find 2’s complement of 1010 NumberNumber : 1010: 1010 1’s complement1’s complement : 0101: 0101 2’s complement2’s complement : 0110: 0110  Add 2’s complement of 1010 with 1100Add 2’s complement of 1010 with 1100 11001100 01100110 00100010
  • 19. Computer Architecture & Microprocessor 1919 BCDBCD  Each digit is represented by four bitsEach digit is represented by four bits Decimal NumberDecimal Number BCDBCD 88 0000100000001000 99 0000100100001001 1010 0001000000010000 1111 0001000100010001 1212 0001001000010010 1313 0001001100010011 1414 0001010000010100 1515 0001010100010101 Decimal NumberDecimal Number BCDBCD 00 00000000 11 00010001 22 00100010 33 00110011 44 01000100 55 01010101 66 01100110 77 01110111
  • 20. Computer Architecture & Microprocessor 2020 Gray CodeGray Code  Only one bit changes for each consecutive numbersOnly one bit changes for each consecutive numbers Decimal NumberDecimal Number Gray CodeGray Code 88 11001100 99 11011101 1010 11111111 1111 11101110 1212 10101010 1313 10111011 1414 10011001 1515 10001000 Decimal NumberDecimal Number Gray CodeGray Code 00 00000000 11 00010001 22 00110011 33 00100010 44 01100110 55 01110111 66 01010101 77 01000100
  • 21. Computer Architecture & Microprocessor 2121 ASCII CodesASCII Codes  American Standard Code for Information InterchangeAmerican Standard Code for Information Interchange  7 bit code7 bit code  Represents upto 128 charactersRepresents upto 128 characters  First 3 bits-zone bitsFirst 3 bits-zone bits  Second 4 bits-numeric bitsSecond 4 bits-numeric bits
  • 22. Computer Architecture & Microprocessor 2222 ASCII CodesASCII Codes ASCII Code Character 00 NUL 01 SOH 02 STX 03 ETX 04 EOT 05 ENQ 06 ACK 07 BEL 08 BS 09 HT 0A LF 0B VT 0C FF 0D CR 0E S1 0F S0 10 DLE ASCII Code Character 11 DC1 (X-on) 12 DC2 (Tape) 13 DC3 (X-off) 14 DC4 15 NAK 16 SYN 17 ETB 18 CAN 19 EM 1A SUB 1B ESC 1C FS 1D GS 1E RS 1F US 20 SP 21 !
  • 23. Computer Architecture & Microprocessor 2323 ASCII CodeASCII Code ASCII Code Character 22 “ 23 # 24 $ 25 % 26 & 27 ‘ 28 ( 29 ) 2A * 2B + 2C , 2D - 2E . 2F / 30 0 31 1 ASCII Code Character 32 2 33 3 34 4 35 5 36 6 37 7 38 8 39 9 3A : 3B ; 3C < 3D = 3E > 3F ? 40 @ 41 A
  • 24. Computer Architecture & Microprocessor 2424 ASCII Code Character 42 B 43 C 44 D 45 E 46 F 47 G 48 H 49 I 4A J 4B K 4C L 4D M 4E N 4F O 50 P 51 Q 52 R 53 S 54 T 55 U ASCII Characters 56 V 57 W 58 X 59 Y 5A Z 5B [ 5C 5D ] 5E ^ ( ) 5F - ( ) 61 a 62 b 63 c 64 d 65 e 66 f 67 g 69 h 6A i 6B j
  • 25. Computer Architecture & Microprocessor 2525 ASCII Code Character 6B k 6C l 6D m 6E n 6F o 70 p 71 q 72 r 73 s 74 t 75 u 76 v 77 w 78 x 79 y 7A z 7B { 7C | 7D } 7E ~ 7F DEL
  • 26. Computer Architecture & Microprocessor 2626 ASCII -8 CodeASCII -8 Code  Uses 8 bit codeUses 8 bit code  Represents upto 256 charactersRepresents upto 256 characters  First 4 bits-zone bitsFirst 4 bits-zone bits  Second 4 bits-numeric bitsSecond 4 bits-numeric bits
  • 27. Computer Architecture & Microprocessor 2727 Logic GatesLogic Gates NOT gateNOT gate or Inverteror Inverter  output is opposite of inputoutput is opposite of input  Truth TableTruth Table I/P 0/PI/P 0/P 0 10 1 1 01 0 I/P O/P
  • 28. Computer Architecture & Microprocessor 2828 AND GateAND Gate Truth TableTruth Table I/P1I/P1 I/P2I/P2 O/PO/P 00 00 00 00 11 00 11 00 00 11 11 11 I/P1 I/P2 O/P
  • 29. Computer Architecture & Microprocessor 2929 NAND GateNAND Gate Truth TableTruth Table I/P1I/P1 I/P2I/P2 O/PO/P 00 00 11 00 11 11 11 00 11 11 11 00 I/P1 I/P2 O/P
  • 30. Computer Architecture & Microprocessor 3030 OR GateOR Gate Truth TableTruth Table I/P1I/P1 I/P2I/P2 O/PO/P 00 00 00 00 11 11 11 00 11 11 11 11 I/P1 I/P2 O/P
  • 31. Computer Architecture & Microprocessor 3131 NOR GateNOR Gate Truth TableTruth Table I/P1I/P1 I/P2I/P2 O/PO/P 00 00 11 00 11 00 11 00 00 11 11 00 I/P1 I/P2 O/P
  • 32. Computer Architecture & Microprocessor 3232 XOR GateXOR Gate Truth TableTruth Table I/P1I/P1 I/P2I/P2 O/PO/P 00 00 00 00 11 11 11 00 11 11 11 00 I/P1 I/P2 O/P
  • 33. Computer Architecture & Microprocessor 3333 XNOR GateXNOR Gate Truth TableTruth Table I/P1I/P1 I/P2I/P2 O/PO/P 00 00 11 00 11 00 11 00 00 11 11 11 I/P1 I/P2 O/P
  • 34. Computer Architecture & Microprocessor 3434 Boolean AlgebraBoolean Algebra  Algebra of binary values(1 & 0)Algebra of binary values(1 & 0)  Types of operationsTypes of operations  OR (+)OR (+)  AND ( . )AND ( . )  NOT (- or ‘ )NOT (- or ‘ )  Minimizes the basic circuits to perform digital operationsMinimizes the basic circuits to perform digital operations
  • 35. Computer Architecture & Microprocessor 3535 Algebraic TheoremsAlgebraic Theorems OR LawsOR Laws • A + 0 = AA + 0 = A • A + 1 =1A + 1 =1 • A + A = AA + A = A • A + A = 1A + A = 1 AND LawsAND Laws • A . 0 = 0A . 0 = 0 • A . 1 = AA . 1 = A • A . A = AA . A = A • A . A = 0A . A = 0
  • 36. Computer Architecture & Microprocessor 3636 Laws of ComplementationLaws of Complementation  A = AA = A  1 = 01 = 0  0 = 10 = 1  If A=0, then A =1If A=0, then A =1  If A=1, then A = 0If A=1, then A = 0 Commutative LawsCommutative Laws  A + B = B + AA + B = B + A  A .B = B .AA .B = B .A Associative LawsAssociative Laws  (A + B) + C = A + (B + C) = A + B + C(A + B) + C = A + (B + C) = A + B + C  (A.B).C = A.(B.C) = A.B.C(A.B).C = A.(B.C) = A.B.C
  • 37. Computer Architecture & Microprocessor 3737 Distributive LawsDistributive Laws  A . (B+C) = A .B + A .CA . (B+C) = A .B + A .C  A + B.C = (A + B) . (A + C)A + B.C = (A + B) . (A + C) Other ExpressionsOther Expressions  A + AB = AA + AB = A  A . (A + B) = AA . (A + B) = A  A + AB = A + BA + AB = A + B  A . (A + B) = ABA . (A + B) = AB  AB + AB = AAB + AB = A  (A + B)(A + B) = A(A + B)(A + B) = A  AB + AC = (A + C) . (A + B)AB + AC = (A + C) . (A + B)  (A + B) ( A + C) = AC + AB(A + B) ( A + C) = AC + AB  AB + AC + BC = AB + ACAB + AC + BC = AB + AC  (A + B)(A + C)(B + C) = (A + B)(A + C)(A + B)(A + C)(B + C) = (A + B)(A + C)
  • 38. Computer Architecture & Microprocessor 3838 Half Adder Has two inputs (the bits to be summed) Has two outputs (the sum bit and the carry bit) AB CD 00 01 10 11 00 10 10 01
  • 39. Computer Architecture & Microprocessor 3939 an bn cn   sn cn+1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 Full Adder – Truth Table
  • 42. Computer Architecture & Microprocessor 4242 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 1 1 1 0 0 1 0 1 1 0 0 1 1 1 0 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 INPUTS X Y Z W A B C D E F G OUTPUT L E G A L D I G I T S 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1 1 1 1 0 0 1 1 1 1 E R R O R 7 Segment LED Display– Truth Table
  • 43. Computer Architecture & Microprocessor 4343 TTL CircuitTTL Circuit  Stands for transistor - transistor logic.Stands for transistor - transistor logic.  Operates between cut-off and saturation.Operates between cut-off and saturation.  Advantages:Advantages: • SpeedSpeed • good fan – in and fan – outgood fan – in and fan – out • easy interface with other digital circuitryeasy interface with other digital circuitry
  • 44. Computer Architecture & Microprocessor 4444 Flip FlopFlip Flop  Stores a binary digitStores a binary digit  Stable till a signal switches itStable till a signal switches it  Types of Types of flip flopTypes of Types of flip flop  S-R flip flopS-R flip flop  J-K flip flopJ-K flip flop  D flip flopD flip flop  T flip flopT flip flop
  • 45. Computer Architecture & Microprocessor 4545 RegistersRegisters  Group of flip-flopsGroup of flip-flops  Connected in parallelConnected in parallel  D flip-flop commonly usedD flip-flop commonly used Shift RegisterShift Register  Shifts content unchangedShifts content unchanged  Temporary storageTemporary storage  Types:Types:  Serial-in, serial-outSerial-in, serial-out  Serial-in, parallel-outSerial-in, parallel-out  Parallel in, serial-outParallel in, serial-out  Parallel in, parallel outParallel in, parallel out
  • 46. Computer Architecture & Microprocessor 4646 CountersCounters  Counts no. of pulsesCounts no. of pulses  Modulus of CounterModulus of Counter • Binary CounterBinary Counter • Decade CounterDecade Counter • Pre settable CounterPre settable Counter Binary CounterBinary Counter J k Q Q J k Q Q J k Q Q J k Q Q CLK 3 2 1 0
  • 47. Computer Architecture & Microprocessor 4747  Types of CountersTypes of Counters  Up CounterUp Counter  Down CounterDown Counter  Up-Down CounterUp-Down Counter  Controlled CounterControlled Counter  Ring CounterRing Counter Synchronous Asynchronous
  • 48. Computer Architecture & Microprocessor 4848 Computer LanguagesComputer Languages  Machine LanguageMachine Language –– 0 and 10 and 1  Assembly LanguageAssembly Language –– mnemonicsmnemonics –– assemblerassembler  High Level LanguageHigh Level Language –– English like languageEnglish like language –– Interpreters and CompilersInterpreters and Compilers
  • 49. Computer Architecture & Microprocessor 4949 Execution of Assembly Language programExecution of Assembly Language program Source Program Assembler Object Program Loader Floppy Disk Floppy Disk  One to One Translation
  • 50. Computer Architecture & Microprocessor 5050 Execution of High Level LanguageExecution of High Level Language Source Code Translator Object Code 1 Object Code 2 Object Code 3  One to Many Translation
  • 51. Computer Architecture & Microprocessor 5151 Compiler & InterpreterCompiler & Interpreter  Interpreter translates line by lineInterpreter translates line by line - Slower- Slower  Compiler translates the entire codeCompiler translates the entire code - faster- faster