SlideShare a Scribd company logo
1 of 19
Start where you are.
Use what you have.
Do what you can.
-Arthur Ashe
CSE-209
Computer Organization &
Architecture
Reference Books
 Computer Architecture and Organization
Hayes J.P., McGraw-Hill.
 Computer organization and design: The
hardware/software interface
Patterson D.A., Hennessy J.L., Morgan Kaufmann.
Lecture - 01
The Basic Information Types
Instruction
Data
Nonnumerical data
Numbers
Fixed-point
Binary
Decimal
Floating-point
Binary
Decimal
Information
Word Length
Bit / Bits Name Descriptions
1 Bit Logic variable, flag.
8 Byte Smallest addressable memory item,
Binary-coded decimal digit pair.
16 Halfword Short fixed-point number. Short address,
Short instruction.
32 Word Fixed or floating point number, Memory
address, Instruction.
64 Double word Long instruction, Double-precision floating
point number.
Some Instruction formats of the Motorola 680X0 microprocessor series
Byte Storage
Byte 0Byte 1Byte 2Byte 3
07152331
Least significant bit
Most significant bit
Indexing convention for the bits and bytes of a word
Big-Endian Storage Method
 Suppose a word Wi is represented
as Bi, 3 Bi, 2 Bi, 1 Bi, 0
 Most significant byte Bi, 3 of Wi is
assigned the lowest address and
the least significant byte Bi, 0 is
assigned the highest address.
 It is so named because it assigns
highest address to byte 0 of a word.
Byte 0,3
Byte 0,2
Byte 0,1
Byte 0,0
Byte 1,3
Byte 1,2
Byte 1,1
Byte 1,0
00
01
…000
…001
…002
…003
…004
…005
…006
…007
Little-Endian Storage Method
 Suppose a word Wi is represented
as Bi, 0 Bi, 1 Bi, 2 Bi, 3
 Most significant byte Bi, 3 of Wi is
assigned the highest address and
the least significant byte Bi, 0 is
assigned the lowest address.
 It is so named because it assigns
lowest address to byte 0 of a word.
Byte 0,0
Byte 0,1
Byte 0,2
Byte 0,3
Byte 1,0
Byte 1,1
Byte 1,2
Byte 1,3
00
01
…000
…001
…002
…003
…004
…005
…006
…007
Tags
 It is a technique of determining the type of a word.
 This is done by associating with each information word a
group of bits, called a tag, that identifies the
word’s type.
Advantages:
 It simplifies instruction specifications.
 Tag inspection permits the hardware to check for
software errors.
Disadvantages:
 They increase memory size.
 Add system hardware costs without increasing
computing performance.
Tags
04751
Parity Check bit
Tagged-word format of the B6500/7500 Series
Information BitsTags
Factors to select a number
representation
 The number types to be represented; for example,
integers or real numbers.
 The range of values (number magnitudes) likely to be
encountered.
 The precision of numbers, which refers to the maximum
accuracy of the representation.
 The cost of the hardware required to store and process
the numbers.
Signed Numbers
3 types of representations of a signed number:
 Sign magnitude
+75=01001011
-75=11001011
 1’s complement
+75= 01001011
-75 = 10110100
 2’s complement
+75= 01001011
-75 = 10110101
Signed Numbers
 Sign magnitude number employ the positional notation
for magnitude and simply change the sign bit to represent
+ or -.
 In both complement code xn-1 retains the role as sign bit,
but remaining bits no longer form a simple positional
code when the number is negative.
 The advantage of the 2’scomplement code is that
subtraction can be performed by logical complementation
and addition only. 2’s complement addition and
subtraction can be implemented by a simple adder for
unsigned numbers.
 Multiplication and division are more difficult to implement
of 2’s complement code.
Signed Numbers
Decimal
Representation
Sign
Magnitude
1’s
Complement
2’s
Complement
+7 0111 0111 0111
+6 0110 0110 0110
+5 0101 0101 0101
+4 0100 0100 0100
+3 0011 0011 0011
+2 0010 0010 0010
+1 0001 0001 0001
+0 0000 0000 0000
-0 1000 1111 0000
-1 1001 1110 1111
-2 1010 1101 1110
-3 1011 1100 1101
-4 1100 1011 1100
-5 1101 1010 1011
-6 1110 1001 1010
-7 1111 1000 1001
Decimal Codes
BCD (Binary coded decimal)
 In BCD format each digit di of a decimal number is
denoted by a 4-bit equivalent bi,3bi,2bi,1bi,0.
 BCD is a weighted (positional) number code where each
bi,j has the weight 10i
2j
.
ASCII
 The 8-bit ASCII code represents the 10 decimal digits by
a 4-bit BCD field and the remaining 4-bits of the ASCII
word have no numerical significance.
Decimal Codes
Excess-Three Code
 The excess-three code can be formed by adding 00112 to
the corresponding BCD number.
 The advantage of the excess-three code is that it may be
processed using the same logic used for binary codes.
 If two excess-three numbers are added like binary
numbers, the required decimal carry is automatically
generated from the high-order bits. The sum must be
corrected by adding +3.
1000 = 5
+ 1100 = 9
Carry 1 0100 Binary sum
+ 0011 Correction
0111 = 4 Excess-three sum
Decimal Codes
Two-out-of-Five
 Each decimal digit is represented by a 5-bit sequence
containing two 1s and three 0s. There are exactly 10
distinct sequence of this type.
 It is single-error detecting code.
 It uses 5 rather than 4 bits per decimal digit.
Decimal Codes
Decimal
Digit
BCD ASCII Excess-three Two-out-of-five
0 0000 00110000 0011 11000
1 0001 00110001 0100 00011
2 0010 00110010 0101 00101
3 0011 00110011 0110 00110
4 0100 00110101 0111 01001
5 0101 00110101 1000 01010
6 0110 00110110 1001 01100
7 0111 00110111 1010 10001
8 1000 00111000 1011 10010
9 1001 00111001 1100 10100

More Related Content

What's hot

Data representation
 Data representation Data representation
Data representationAshraf Miraz
 
[1] Data Representation
[1] Data Representation[1] Data Representation
[1] Data RepresentationMr McAlpine
 
Dr.naveen electronics binary codes
Dr.naveen electronics binary codesDr.naveen electronics binary codes
Dr.naveen electronics binary codesNAVEEN KUMAR
 
review of number systems and codes
review of number systems and codesreview of number systems and codes
review of number systems and codessrinu247
 
Data representation
Data representationData representation
Data representationMysore
 
Computer architecture data representation
Computer architecture  data representationComputer architecture  data representation
Computer architecture data representationAnil Pokhrel
 
3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )MdFazleRabbi18
 
digital logic circuits, digital component floting and fixed point
 digital logic circuits, digital component floting and fixed point digital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed pointRai University
 
BCD to binary code converter
BCD to binary code converterBCD to binary code converter
BCD to binary code converterkiruthikamaniG1
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeBala Ganesh
 
Lecture 2
Lecture 2Lecture 2
Lecture 2Muuluu
 

What's hot (20)

Data representation
Data representationData representation
Data representation
 
Data representation
 Data representation Data representation
Data representation
 
[1] Data Representation
[1] Data Representation[1] Data Representation
[1] Data Representation
 
Dr.naveen electronics binary codes
Dr.naveen electronics binary codesDr.naveen electronics binary codes
Dr.naveen electronics binary codes
 
Binary codes
Binary codesBinary codes
Binary codes
 
review of number systems and codes
review of number systems and codesreview of number systems and codes
review of number systems and codes
 
. computer codes
. computer codes. computer codes
. computer codes
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computers
 
Data representation
Data representationData representation
Data representation
 
Computer architecture data representation
Computer architecture  data representationComputer architecture  data representation
Computer architecture data representation
 
Data Representation
Data RepresentationData Representation
Data Representation
 
3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )3.codes( binary code ,excess 3, gray code )
3.codes( binary code ,excess 3, gray code )
 
digital logic circuits, digital component floting and fixed point
 digital logic circuits, digital component floting and fixed point digital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed point
 
BCD to binary code converter
BCD to binary code converterBCD to binary code converter
BCD to binary code converter
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray code
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Meghna ppt.
Meghna ppt.Meghna ppt.
Meghna ppt.
 
Data Representation
Data RepresentationData Representation
Data Representation
 
BCD.
BCD.BCD.
BCD.
 

Similar to Lecture 01

Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptMarlonMagtibay2
 
Computers numbering systems
Computers   numbering systemsComputers   numbering systems
Computers numbering systemssld1950
 
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
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxMinahilUmar1
 
Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes VandanaPagar1
 
Octal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversionsOctal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversionsAfrasiyab Haider
 
New Computer Systems
New Computer SystemsNew Computer Systems
New Computer Systemsmrsmackenzie
 
Computer Systems
Computer SystemsComputer Systems
Computer Systemsdrs
 
Learning&Teaching Systems Ppt
Learning&Teaching Systems PptLearning&Teaching Systems Ppt
Learning&Teaching Systems Pptekul
 
Learning&Teaching Systems Ppt
Learning&Teaching Systems PptLearning&Teaching Systems Ppt
Learning&Teaching Systems PptKyle
 
Learning& Teaching Systems Ppt
Learning& Teaching  Systems PptLearning& Teaching  Systems Ppt
Learning& Teaching Systems PptNaruin
 
Ch12- instruction sets- char & funct.pdf
Ch12- instruction sets- char & funct.pdfCh12- instruction sets- char & funct.pdf
Ch12- instruction sets- char & funct.pdfsaimawarsi
 

Similar to Lecture 01 (20)

Class2
Class2Class2
Class2
 
Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.ppt
 
Codes
CodesCodes
Codes
 
Computers numbering systems
Computers   numbering systemsComputers   numbering systems
Computers numbering systems
 
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
 
Chapter1-bag2-mikroprocessor
Chapter1-bag2-mikroprocessorChapter1-bag2-mikroprocessor
Chapter1-bag2-mikroprocessor
 
NUMBER SYSTEM
NUMBER SYSTEMNUMBER SYSTEM
NUMBER SYSTEM
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptx
 
NUMBER SYSTEM.pptx
NUMBER SYSTEM.pptxNUMBER SYSTEM.pptx
NUMBER SYSTEM.pptx
 
Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes
 
Number system
Number system Number system
Number system
 
Number system
Number systemNumber system
Number system
 
Octal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversionsOctal to binary and octal to hexa decimal conversions
Octal to binary and octal to hexa decimal conversions
 
Codes r005
Codes  r005Codes  r005
Codes r005
 
New Computer Systems
New Computer SystemsNew Computer Systems
New Computer Systems
 
Computer Systems
Computer SystemsComputer Systems
Computer Systems
 
Learning&Teaching Systems Ppt
Learning&Teaching Systems PptLearning&Teaching Systems Ppt
Learning&Teaching Systems Ppt
 
Learning&Teaching Systems Ppt
Learning&Teaching Systems PptLearning&Teaching Systems Ppt
Learning&Teaching Systems Ppt
 
Learning& Teaching Systems Ppt
Learning& Teaching  Systems PptLearning& Teaching  Systems Ppt
Learning& Teaching Systems Ppt
 
Ch12- instruction sets- char & funct.pdf
Ch12- instruction sets- char & funct.pdfCh12- instruction sets- char & funct.pdf
Ch12- instruction sets- char & funct.pdf
 

Recently uploaded

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
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
 
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
 
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
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
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
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 

Recently uploaded (20)

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
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
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.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
 
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
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
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
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 

Lecture 01

  • 1. Start where you are. Use what you have. Do what you can. -Arthur Ashe
  • 3. Reference Books  Computer Architecture and Organization Hayes J.P., McGraw-Hill.  Computer organization and design: The hardware/software interface Patterson D.A., Hennessy J.L., Morgan Kaufmann.
  • 5. The Basic Information Types Instruction Data Nonnumerical data Numbers Fixed-point Binary Decimal Floating-point Binary Decimal Information
  • 6. Word Length Bit / Bits Name Descriptions 1 Bit Logic variable, flag. 8 Byte Smallest addressable memory item, Binary-coded decimal digit pair. 16 Halfword Short fixed-point number. Short address, Short instruction. 32 Word Fixed or floating point number, Memory address, Instruction. 64 Double word Long instruction, Double-precision floating point number. Some Instruction formats of the Motorola 680X0 microprocessor series
  • 7. Byte Storage Byte 0Byte 1Byte 2Byte 3 07152331 Least significant bit Most significant bit Indexing convention for the bits and bytes of a word
  • 8. Big-Endian Storage Method  Suppose a word Wi is represented as Bi, 3 Bi, 2 Bi, 1 Bi, 0  Most significant byte Bi, 3 of Wi is assigned the lowest address and the least significant byte Bi, 0 is assigned the highest address.  It is so named because it assigns highest address to byte 0 of a word. Byte 0,3 Byte 0,2 Byte 0,1 Byte 0,0 Byte 1,3 Byte 1,2 Byte 1,1 Byte 1,0 00 01 …000 …001 …002 …003 …004 …005 …006 …007
  • 9. Little-Endian Storage Method  Suppose a word Wi is represented as Bi, 0 Bi, 1 Bi, 2 Bi, 3  Most significant byte Bi, 3 of Wi is assigned the highest address and the least significant byte Bi, 0 is assigned the lowest address.  It is so named because it assigns lowest address to byte 0 of a word. Byte 0,0 Byte 0,1 Byte 0,2 Byte 0,3 Byte 1,0 Byte 1,1 Byte 1,2 Byte 1,3 00 01 …000 …001 …002 …003 …004 …005 …006 …007
  • 10. Tags  It is a technique of determining the type of a word.  This is done by associating with each information word a group of bits, called a tag, that identifies the word’s type. Advantages:  It simplifies instruction specifications.  Tag inspection permits the hardware to check for software errors. Disadvantages:  They increase memory size.  Add system hardware costs without increasing computing performance.
  • 11. Tags 04751 Parity Check bit Tagged-word format of the B6500/7500 Series Information BitsTags
  • 12. Factors to select a number representation  The number types to be represented; for example, integers or real numbers.  The range of values (number magnitudes) likely to be encountered.  The precision of numbers, which refers to the maximum accuracy of the representation.  The cost of the hardware required to store and process the numbers.
  • 13. Signed Numbers 3 types of representations of a signed number:  Sign magnitude +75=01001011 -75=11001011  1’s complement +75= 01001011 -75 = 10110100  2’s complement +75= 01001011 -75 = 10110101
  • 14. Signed Numbers  Sign magnitude number employ the positional notation for magnitude and simply change the sign bit to represent + or -.  In both complement code xn-1 retains the role as sign bit, but remaining bits no longer form a simple positional code when the number is negative.  The advantage of the 2’scomplement code is that subtraction can be performed by logical complementation and addition only. 2’s complement addition and subtraction can be implemented by a simple adder for unsigned numbers.  Multiplication and division are more difficult to implement of 2’s complement code.
  • 15. Signed Numbers Decimal Representation Sign Magnitude 1’s Complement 2’s Complement +7 0111 0111 0111 +6 0110 0110 0110 +5 0101 0101 0101 +4 0100 0100 0100 +3 0011 0011 0011 +2 0010 0010 0010 +1 0001 0001 0001 +0 0000 0000 0000 -0 1000 1111 0000 -1 1001 1110 1111 -2 1010 1101 1110 -3 1011 1100 1101 -4 1100 1011 1100 -5 1101 1010 1011 -6 1110 1001 1010 -7 1111 1000 1001
  • 16. Decimal Codes BCD (Binary coded decimal)  In BCD format each digit di of a decimal number is denoted by a 4-bit equivalent bi,3bi,2bi,1bi,0.  BCD is a weighted (positional) number code where each bi,j has the weight 10i 2j . ASCII  The 8-bit ASCII code represents the 10 decimal digits by a 4-bit BCD field and the remaining 4-bits of the ASCII word have no numerical significance.
  • 17. Decimal Codes Excess-Three Code  The excess-three code can be formed by adding 00112 to the corresponding BCD number.  The advantage of the excess-three code is that it may be processed using the same logic used for binary codes.  If two excess-three numbers are added like binary numbers, the required decimal carry is automatically generated from the high-order bits. The sum must be corrected by adding +3. 1000 = 5 + 1100 = 9 Carry 1 0100 Binary sum + 0011 Correction 0111 = 4 Excess-three sum
  • 18. Decimal Codes Two-out-of-Five  Each decimal digit is represented by a 5-bit sequence containing two 1s and three 0s. There are exactly 10 distinct sequence of this type.  It is single-error detecting code.  It uses 5 rather than 4 bits per decimal digit.
  • 19. Decimal Codes Decimal Digit BCD ASCII Excess-three Two-out-of-five 0 0000 00110000 0011 11000 1 0001 00110001 0100 00011 2 0010 00110010 0101 00101 3 0011 00110011 0110 00110 4 0100 00110101 0111 01001 5 0101 00110101 1000 01010 6 0110 00110110 1001 01100 7 0111 00110111 1010 10001 8 1000 00111000 1011 10010 9 1001 00111001 1100 10100