SlideShare uma empresa Scribd logo
1 de 6
Data Representation 1 Lecture 4
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Overview
 Introduction
 Data representation
 Fixed Point Representation
Integer Representation
 Floating Point Representation
Normalization
Data Representation 2 Lecture 4
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Introduction
Data
Numeric data - numbers(integer, real)
Non-numeric data - symbols, letters
Number System
Non-positional number system
- Roman number system
Positional number system
- Each digit position has a value called a weight associated with it
- Decimal, Octal, Hexadecimal, Binary
Base (or radix) R number
Uses R distinct symbols for each digit
Example AR = an-1 an-2 ...a1 a0 . a-1…a-m
V(AR ) =
1n
mi
i
i Ra Radix point(.) separates the integer
portion and the fractional portion
R = 10 Decimal number system R = 2 Binary
R = 8 Octal, R = 16 Hexadecimal
Data Representation 3 Lecture 4
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Representation of Positional Numbers
Decimal Binary Octal Hexadecimal
00 0000 00 0
01 0001 01 1
02 0010 02 2
03 0011 03 3
04 0100 04 4
05 0101 05 5
06 0110 06 6
07 0111 07 7
08 1000 10 8
09 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
Data Representation 4 Lecture 4
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
COMPLEMENT OF NUMBERS
Two types of complements for base R number system:
R's complement and (R-1)'s complement
The (R-1)'s Complement
Subtract each digit of a number from (R-1)
Example
- 9's complement of 83510 is 16410
- 1's complement of 10102 is 01012(bit by bit complement operation)
The R's Complement
Add 1 to the low-order digit of its (R-1)'s complement
Example
- 10's complement of 83510 is 16410 + 1 = 16510
- 2's complement of 10102 is 01012 + 1 = 01102
Data Representation 5 Lecture 4
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Fixed Point Representation
Binary Fixed-Point Representation
X = xnxn-1xn-2 ... x1x0. x-1x-2 ... x-m
Sign Bit(xn): 0 for positive - 1 for negative
Remaining Bits(xn-1xn-2 ... x1x0. x-1x-2 ... x-m)
Numbers: Fixed Point Numbers and Floating Point Numbers
Data Representation 6 Lecture 4
CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT
Fixed Point Representation
Example: Represent +9 and -9 in 7 bit-binary number
Only one way to represent + 9 ==> 0 001001
Three different ways to represent - 9:
In signed-magnitude: 1 001001
In signed-1's complement: 1 110110
In signed-2's complement: 1 110111
Fixed point numbers are represented either integer part only or fractional part only.
Representation of both positive and negative numbers
- Following 3 representations
Signed magnitude representation
Signed 1's complement representation
Signed 2's complement representation

Mais conteúdo relacionado

Mais procurados

Computer organiztion4
Computer organiztion4Computer organiztion4
Computer organiztion4
Umang Gupta
 

Mais procurados (20)

Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Register Transfer Language
Register Transfer LanguageRegister Transfer Language
Register Transfer Language
 
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
Computer organization prashant odhavani- 160920107003
Computer organization   prashant odhavani- 160920107003Computer organization   prashant odhavani- 160920107003
Computer organization prashant odhavani- 160920107003
 
MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...
 
Computer organiztion4
Computer organiztion4Computer organiztion4
Computer organiztion4
 
RTL
 RTL RTL
RTL
 
memory reference instruction
memory reference instructionmemory reference instruction
memory reference instruction
 
RTL
RTLRTL
RTL
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtl
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing Modes
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basics
 
Lecture 27
Lecture 27Lecture 27
Lecture 27
 
Lec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processorLec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processor
 
Various type of register
Various type of registerVarious type of register
Various type of register
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
 
Pipeline r014
Pipeline   r014Pipeline   r014
Pipeline r014
 
REGISTER TRANSFER AND MICRO OPERATIONS
REGISTER TRANSFER AND MICRO OPERATIONSREGISTER TRANSFER AND MICRO OPERATIONS
REGISTER TRANSFER AND MICRO OPERATIONS
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 

Semelhante a Lecture 4

Computer organiztion2
Computer organiztion2Computer organiztion2
Computer organiztion2
Umang Gupta
 

Semelhante a Lecture 4 (20)

Datarepresentation2
Datarepresentation2Datarepresentation2
Datarepresentation2
 
Data representation moris mano ch 03
Data representation   moris mano ch  03Data representation   moris mano ch  03
Data representation moris mano ch 03
 
DATA REPRESENTATION
DATA  REPRESENTATIONDATA  REPRESENTATION
DATA REPRESENTATION
 
Ch3
Ch3Ch3
Ch3
 
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
 
Computer organiztion2
Computer organiztion2Computer organiztion2
Computer organiztion2
 
Unsigned and Signed fixed point Addition and subtraction
Unsigned and Signed  fixed point Addition and subtractionUnsigned and Signed  fixed point Addition and subtraction
Unsigned and Signed fixed point Addition and subtraction
 
Data representation
Data representationData representation
Data representation
 
NUMBER SYSTEM.pptx
NUMBER SYSTEM.pptxNUMBER SYSTEM.pptx
NUMBER SYSTEM.pptx
 
Chapter 1 digital design.pptx
Chapter 1 digital design.pptxChapter 1 digital design.pptx
Chapter 1 digital design.pptx
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
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
 
compliments
 compliments compliments
compliments
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Concept map for Number system
Concept map for Number systemConcept map for Number system
Concept map for Number system
 
DLD_Lecture_notes2.ppt
DLD_Lecture_notes2.pptDLD_Lecture_notes2.ppt
DLD_Lecture_notes2.ppt
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbers
 
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
 
Number System
Number SystemNumber System
Number System
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 

Mais de RahulRathi94 (20)

Lecture 47
Lecture 47Lecture 47
Lecture 47
 
Lecture 46
Lecture 46Lecture 46
Lecture 46
 
Lecture 44
Lecture 44Lecture 44
Lecture 44
 
Lecture 43
Lecture 43Lecture 43
Lecture 43
 
Lecture 42
Lecture 42Lecture 42
Lecture 42
 
Lecture 41
Lecture 41Lecture 41
Lecture 41
 
Lecture 40
Lecture 40Lecture 40
Lecture 40
 
Lecture 39
Lecture 39Lecture 39
Lecture 39
 
Lecture 38
Lecture 38Lecture 38
Lecture 38
 
Lecture 37
Lecture 37Lecture 37
Lecture 37
 
Lecture 36
Lecture 36Lecture 36
Lecture 36
 
Lecture 35
Lecture 35Lecture 35
Lecture 35
 
Lecture 34
Lecture 34Lecture 34
Lecture 34
 
Lecture 28
Lecture 28Lecture 28
Lecture 28
 
Lecture 24
Lecture 24Lecture 24
Lecture 24
 
Lecture 22
Lecture 22Lecture 22
Lecture 22
 
Lecture 21
Lecture 21Lecture 21
Lecture 21
 
Lecture 20
Lecture 20Lecture 20
Lecture 20
 
Lecture 19
Lecture 19Lecture 19
Lecture 19
 
Lecture 18
Lecture 18Lecture 18
Lecture 18
 

Último

Último (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Lecture 4

  • 1. Data Representation 1 Lecture 4 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Overview  Introduction  Data representation  Fixed Point Representation Integer Representation  Floating Point Representation Normalization
  • 2. Data Representation 2 Lecture 4 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Introduction Data Numeric data - numbers(integer, real) Non-numeric data - symbols, letters Number System Non-positional number system - Roman number system Positional number system - Each digit position has a value called a weight associated with it - Decimal, Octal, Hexadecimal, Binary Base (or radix) R number Uses R distinct symbols for each digit Example AR = an-1 an-2 ...a1 a0 . a-1…a-m V(AR ) = 1n mi i i Ra Radix point(.) separates the integer portion and the fractional portion R = 10 Decimal number system R = 2 Binary R = 8 Octal, R = 16 Hexadecimal
  • 3. Data Representation 3 Lecture 4 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Representation of Positional Numbers Decimal Binary Octal Hexadecimal 00 0000 00 0 01 0001 01 1 02 0010 02 2 03 0011 03 3 04 0100 04 4 05 0101 05 5 06 0110 06 6 07 0111 07 7 08 1000 10 8 09 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F
  • 4. Data Representation 4 Lecture 4 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT COMPLEMENT OF NUMBERS Two types of complements for base R number system: R's complement and (R-1)'s complement The (R-1)'s Complement Subtract each digit of a number from (R-1) Example - 9's complement of 83510 is 16410 - 1's complement of 10102 is 01012(bit by bit complement operation) The R's Complement Add 1 to the low-order digit of its (R-1)'s complement Example - 10's complement of 83510 is 16410 + 1 = 16510 - 2's complement of 10102 is 01012 + 1 = 01102
  • 5. Data Representation 5 Lecture 4 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Fixed Point Representation Binary Fixed-Point Representation X = xnxn-1xn-2 ... x1x0. x-1x-2 ... x-m Sign Bit(xn): 0 for positive - 1 for negative Remaining Bits(xn-1xn-2 ... x1x0. x-1x-2 ... x-m) Numbers: Fixed Point Numbers and Floating Point Numbers
  • 6. Data Representation 6 Lecture 4 CSE 211, Computer Organization and Architecture Harjeet Kaur, CSE/IT Fixed Point Representation Example: Represent +9 and -9 in 7 bit-binary number Only one way to represent + 9 ==> 0 001001 Three different ways to represent - 9: In signed-magnitude: 1 001001 In signed-1's complement: 1 110110 In signed-2's complement: 1 110111 Fixed point numbers are represented either integer part only or fractional part only. Representation of both positive and negative numbers - Following 3 representations Signed magnitude representation Signed 1's complement representation Signed 2's complement representation