SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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...Rai University
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operationNikhil Pandit
 
Computer organization prashant odhavani- 160920107003
Computer organization   prashant odhavani- 160920107003Computer organization   prashant odhavani- 160920107003
Computer organization prashant odhavani- 160920107003Prashant odhavani
 
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...Rai University
 
Computer organiztion4
Computer organiztion4Computer organiztion4
Computer organiztion4Umang Gupta
 
memory reference instruction
memory reference instructionmemory reference instruction
memory reference instructionDeepikaT13
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtlMazin Alwaaly
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing ModesMayank Garg
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basicsDeepak John
 
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 processorMayank Roy
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registersmahesh kumar prajapat
 
REGISTER TRANSFER AND MICRO OPERATIONS
REGISTER TRANSFER AND MICRO OPERATIONSREGISTER TRANSFER AND MICRO OPERATIONS
REGISTER TRANSFER AND MICRO OPERATIONSAnonymous Red
 

Tendances (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
 

Similaire à Lecture 4

Data representation moris mano ch 03
Data representation   moris mano ch  03Data representation   moris mano ch  03
Data representation moris mano ch 03thearticlenow
 
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
 
Computer organiztion2
Computer organiztion2Computer organiztion2
Computer organiztion2Umang Gupta
 
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 subtractionciyamala kushbu
 
Chapter 1 digital design.pptx
Chapter 1 digital design.pptxChapter 1 digital design.pptx
Chapter 1 digital design.pptxAliaaTarek5
 
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
 
Concept map for Number system
Concept map for Number systemConcept map for Number system
Concept map for Number systemPramodya Kodikara
 
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 numbersMohammad Bashartullah
 
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
 

Similaire à 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
 

Plus 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
 

Dernier

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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?Igalia
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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 DevelopmentsTrustArc
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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 TerraformAndrey Devyatkin
 
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 StrategiesBoston Institute of Analytics
 
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 CVKhem
 
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 DiscoveryTrustArc
 

Dernier (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
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
 
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 - 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
 

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