SlideShare a Scribd company logo
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

PDF
Binary codes
PPTX
Binary codes
PPT
Data Representation
PPTX
Bcd with access 3
PPTX
Bcd to excess 3 code converter
DOCX
Manoch1raw 160512091436
PDF
Data representation computer architecture
PDF
Application in comprog
Binary codes
Binary codes
Data Representation
Bcd with access 3
Bcd to excess 3 code converter
Manoch1raw 160512091436
Data representation computer architecture
Application in comprog

What's hot (20)

PPTX
Data representation
PPTX
Data representation
PPT
[1] Data Representation
PPT
Dr.naveen electronics binary codes
PPT
Binary codes
PPTX
review of number systems and codes
PPTX
. computer codes
PDF
Digital electronics
PDF
Data representation in computers
PDF
Data representation
PPTX
Computer architecture data representation
PPTX
Data Representation
PPTX
3.codes( binary code ,excess 3, gray code )
PPT
digital logic circuits, digital component floting and fixed point
PPTX
BCD to binary code converter
PPTX
Chap ii.BCD code,Gray code
PPTX
Lecture 2
PPT
Meghna ppt.
PPTX
Data Representation
PPTX
Data representation
Data representation
[1] Data Representation
Dr.naveen electronics binary codes
Binary codes
review of number systems and codes
. computer codes
Digital electronics
Data representation in computers
Data representation
Computer architecture data representation
Data Representation
3.codes( binary code ,excess 3, gray code )
digital logic circuits, digital component floting and fixed point
BCD to binary code converter
Chap ii.BCD code,Gray code
Lecture 2
Meghna ppt.
Data Representation
Ad

Similar to Lecture 01 (20)

PPTX
Class2
PPT
MathinaDigitalAgePowerPoin1111224254.ppt
PPT
MathinaDigitalAgePowerPoint slideshare.ppt
PPTX
ARCsxfhcjkvmnfxcgbfgcxhvbxdfzxcgbfxgcvbnx3.pptx
PPT
Lecture_Computer_Codes.ppt
PPT
Data-Representation about programming.ppt
PDF
Unit 1 Class Notes Printed digital Electronics.pdf
PPTX
PPTX
Digital Fundamental - Binary Codes-Logic Gates
PPTX
Data-and-Number-Representations CSE 101.pptx
PPTX
Data Representation from knowledge center
PPTX
CSC304 - Digital Logic & Computer Organization and.pptx
PPT
Computers numbering systems
PDF
CODES_2.elictronicjajajajsjjsjdjdjcjdjjsksjs
PPTX
UNIT-I U20EST109 - PROBLEM SOLVING APPROACH - Copy (1).pptx
PPT
Data representation _
PPT
Chapter1-bag2-mikroprocessor
PDF
form-3-computer studies summarized NOTES.pdf
PPT
dld chapter 2 logic gates and logic works affer subtactor
PPTX
Coding Schemes related dld lecture it is dld
Class2
MathinaDigitalAgePowerPoin1111224254.ppt
MathinaDigitalAgePowerPoint slideshare.ppt
ARCsxfhcjkvmnfxcgbfgcxhvbxdfzxcgbfxgcvbnx3.pptx
Lecture_Computer_Codes.ppt
Data-Representation about programming.ppt
Unit 1 Class Notes Printed digital Electronics.pdf
Digital Fundamental - Binary Codes-Logic Gates
Data-and-Number-Representations CSE 101.pptx
Data Representation from knowledge center
CSC304 - Digital Logic & Computer Organization and.pptx
Computers numbering systems
CODES_2.elictronicjajajajsjjsjdjdjcjdjjsksjs
UNIT-I U20EST109 - PROBLEM SOLVING APPROACH - Copy (1).pptx
Data representation _
Chapter1-bag2-mikroprocessor
form-3-computer studies summarized NOTES.pdf
dld chapter 2 logic gates and logic works affer subtactor
Coding Schemes related dld lecture it is dld
Ad

Recently uploaded (20)

PPTX
Cell Structure & Organelles in detailed.
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Lesson notes of climatology university.
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
01-Introduction-to-Information-Management.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
Cell Structure & Organelles in detailed.
VCE English Exam - Section C Student Revision Booklet
O7-L3 Supply Chain Operations - ICLT Program
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Lesson notes of climatology university.
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Complications of Minimal Access Surgery at WLH
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
O5-L3 Freight Transport Ops (International) V1.pdf
Microbial diseases, their pathogenesis and prophylaxis
Sports Quiz easy sports quiz sports quiz
Abdominal Access Techniques with Prof. Dr. R K Mishra
Renaissance Architecture: A Journey from Faith to Humanism
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPH.pptx obstetrics and gynecology in nursing
Microbial disease of the cardiovascular and lymphatic systems
01-Introduction-to-Information-Management.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf

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