SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Computers – Numbering Systems
The Binary System
This is a numbering system to the base of two, meaning that it only has two digits 0 and 1.
The binary system is the base numbering system used in computer and digital logic control
systems.
Binary numbers are written as a sequence of zero’s and one’s, where: 0101; 1000; 1001 are
examples of four-bit binary numbers.
Weighting
Each column in the binary number represents a denary number as shown below
and doubles with each column.
This is called the ‘weighting’ of the numbering system.
Each 1 or 0 multiplies a successive power of 2.
8 4 2 1
LSBMSB
23
22
21
20
Bin 1 1 0 1 = (1x8) + (1x4) + (0x2) + (1x1)= 13d
Computers – Numbering Systems
The Hexadecimal System
Numbers in the binary system tend to get very long, the hex system is more compact and
less prone to error.
Each column represents a successive power of sixteen (base 16).
Hex symbols 0 – 9 for decimal 0 – 9 and A to F for decimal 10 to 15.
256 16 1
162
161
160
Hex 2 3 4 = (2x256) + (3x16) + (4x1) = 564d
Decimal Binary Hex
101
(10)
100
(1)
24
(16)
23
(8)
22
(4)
21
(2)
20
(1)
161
(16)
160
(1)
0 7 0 0 1 1 1 0 7
1 0 0 1 0 1 0 0 A
1 2 0 1 1 0 0 0 C
1 5 0 1 1 1 1 0 F
2 7 1 1 0 1 1 1 8
Computers – Numbering Systems
The Hexadecimal System
To write a binary number in hexadecimal group the number into four-bit groups beginning
with the LSB and write the hex equivalent of each group.
Example
Decimal 245 = 11110101
Group into four bits, = 1111 0101
Hex = F 5
Decimal 245 = F5 (Hex)
The Octal System
A base-8 system from an early era, used during the development of the first computer
systems and is not commonly used these days.
Although it does not require the extra symbols (A-F “hex”) it is extremely awkward when
applied to byte-organised words of today’s computer systems.
BINARY CODED DECIMAL (BCD)
By converting (encoding) each decimal digit into a four-bit binary group we obtain a
system called Binary Coded Decimal (BCD).
This system is ideal for use when we wish to display a decimal digit from its binary
equivalent eg digital displays.
Each four-bit group is binary weighted and represents a single digit.
Computers – Numbering Systems
Example
Decimal 245 = 2 4 5
BCD = 0010 0100 0101
Computers – Numbering Systems
2. State the decimal equivalents represented by the binary numbers shown below,
a) 01100101, b) 10110011, c) 10111101.
Assessment
1. Write down the binary equivalents for denary numbers 0 to 12, 28, 32 and 64.
3. State the hexadecimal equivalents for the denary numbers shown below,
a) 8, b) 12, c) 18, d) 28.
4. Convert the binary numbers in question 2 to their hexadecimal equivalents.
5. Convert the binary numbers in question 2 to their BCD equivalents.
ASCII CODE
This is the American Standard Code for Information Interchange.
It is a method of coding alphabetic, numeric and punctuation characters into
groups of 7-bits.
Computers – Coding Systems
Char Hex Dec Char Hex Dec
A 41H 65 a 61H 97
B 42H 66 b 62H 98
C 43H 67 c 63H 99
0 30H 48  5CH 92
1 31H 49 ] 5DH 93
2 32H 50 < 3CH 60
GRAY CODE
The Gray code is used for mechanical shaft-angle encoders, the feature of this
code is that only one bit changes in going from one state to the next.
This method prevents errors, since there is no way of guaranteeing that all bits will
change simultaneously at the boundary between two encoded states.
Computers – Coding Systems
Position Gray Code Position Gray Code
0 0000 8 1100
1 0001 9 1101
2 0011 10 1111
3 0010 11 1110
4 0110 12 1010
5 0111 13 1011
6 0101 14 1001
7 0100 15 1000
D0
D1
D2
D3
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 position
LED’s
2’s COMPLEMENT
The “2’s complement” is the method most widely used for integer computation in
electronic systems.
To obtain a negative number (2’s complement) first complement each bit of the
positive number then add 1.
Computers – Arithmetic Operations
Check this by adding the original positive number to the 2’s complement
representation.
The result should be zero, since the 2’s complement changes the sign of the
original positive number.
Example
Decimal 5 = 0101
1’s complement = 1010
+1 (2’s complement) = 1011
Using the 2’s Complement
Subtract B from A, take the 2’s complement of B (create a negative of B) then add
this to A.
Computers – Arithmetic Operations
Example
5 - 2 = 5 + (-2)
2 = 0010
1’s complement = 110
+1 (2’s complement) = 1110
5 = 0101
Add = 0011 = 3
Computers – Data Systems
BITS to GIGABYTES
The bit is short for binary digit and has two values (0 or 1)
When four binary bits are grouped together they form a nybble,
‘0110’ and ‘1110’.
When two nibbles, (eight binary bits) are grouped together they form a
byte,‘10110101’ and ‘00110111’.
A word is the term used to represent the unit of data in a particular system.
In an eight bit system the word contains eight bits.
Personal computers today use 32 and 64 bit words while pic’s and micro-
controller’s and Z80cpu systems use four and eight bit words.
Computers – Data Systems
BITS to GIGABYTES – Common Units of Measure
Kilobyte (kB) – Describes the data storage capacity of small systems e.g. memory
capacity for micro-controllers and size of data files.
1kB = 1024 bytes (210
bytes).
Megabyte (MB) – Describes the data storage capacity of memory devices, image
files (bitmaps).
1MB = 1024 kB (220
bytes).
Gigabyte (GB) – Describes the data storage capacity of hard drives, CD/DVD data
storage devices. The gigabyte is the largest unit of capacity in use at present.
1GB = 1024 MB (230
bytes).

Weitere ähnliche Inhalte

Was ist angesagt?

Data Representation
Data RepresentationData Representation
Data Representation
Rick Jamil
 
Computer Systems Data Representation
Computer Systems   Data RepresentationComputer Systems   Data Representation
Computer Systems Data Representation
iarthur
 
Data representation
Data representationData representation
Data representation
rozanadiana
 
Topic 1 Data Representation
Topic 1 Data RepresentationTopic 1 Data Representation
Topic 1 Data Representation
ekul
 
How computers represent data
How computers represent dataHow computers represent data
How computers represent data
Shaon Ahmed
 
2.1 data represent on cpu
2.1 data represent on cpu2.1 data represent on cpu
2.1 data represent on cpu
Wan Afirah
 

Was ist angesagt? (20)

Data representation
Data representationData representation
Data representation
 
Data representation
Data representationData representation
Data representation
 
NUMBER SYSTEM
NUMBER SYSTEMNUMBER SYSTEM
NUMBER SYSTEM
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Data representation
Data representationData representation
Data representation
 
Computer Systems Data Representation
Computer Systems   Data RepresentationComputer Systems   Data Representation
Computer Systems Data Representation
 
Data representation in computers
Data representation in computersData representation in computers
Data representation in computers
 
Data representation
Data representationData representation
Data representation
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Understand data representation on CPU 1
Understand data representation on CPU 1Understand data representation on CPU 1
Understand data representation on CPU 1
 
Topic 1 Data Representation
Topic 1 Data RepresentationTopic 1 Data Representation
Topic 1 Data Representation
 
Computer architecture data representation
Computer architecture  data representationComputer architecture  data representation
Computer architecture data representation
 
data representation
 data representation data representation
data representation
 
How computers represent data
How computers represent dataHow computers represent data
How computers represent data
 
Representation of Real Numbers
Representation of Real NumbersRepresentation of Real Numbers
Representation of Real Numbers
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
 
Number System & Data Representation
Number System & Data RepresentationNumber System & Data Representation
Number System & Data Representation
 
2.1 data represent on cpu
2.1 data represent on cpu2.1 data represent on cpu
2.1 data represent on cpu
 
Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...
 
Basics of digital electronics
Basics of digital electronicsBasics of digital electronics
Basics of digital electronics
 

Andere mochten auch

Components logic gates
Components   logic gatesComponents   logic gates
Components logic gates
sld1950
 
Elect principles -_capacitance
Elect principles -_capacitanceElect principles -_capacitance
Elect principles -_capacitance
sdacey
 
Elect principles -_ac_circuits_year1
Elect principles -_ac_circuits_year1Elect principles -_ac_circuits_year1
Elect principles -_ac_circuits_year1
sdacey
 
Elect principles -_ac_waveform_year1
Elect principles -_ac_waveform_year1Elect principles -_ac_waveform_year1
Elect principles -_ac_waveform_year1
sdacey
 
Elect principles -_resistance
Elect principles -_resistanceElect principles -_resistance
Elect principles -_resistance
sdacey
 
Components the diode
Components   the diodeComponents   the diode
Components the diode
sdacey
 
Elect principles -_kirchhoffs_laws
Elect principles -_kirchhoffs_lawsElect principles -_kirchhoffs_laws
Elect principles -_kirchhoffs_laws
sdacey
 
Binary Slides
Binary Slides Binary Slides
Binary Slides
jnoles
 
Computer number systems
Computer number systemsComputer number systems
Computer number systems
Revi Shahini
 
Number System
Number SystemNumber System
Number System
itutor
 
Introduction to the Binary Number System
Introduction to the Binary Number SystemIntroduction to the Binary Number System
Introduction to the Binary Number System
James Hamilton
 
number system
number systemnumber system
number system
virly dwe
 

Andere mochten auch (20)

Components logic gates
Components   logic gatesComponents   logic gates
Components logic gates
 
Elect principles -_capacitance
Elect principles -_capacitanceElect principles -_capacitance
Elect principles -_capacitance
 
Elect principles -_ac_circuits_year1
Elect principles -_ac_circuits_year1Elect principles -_ac_circuits_year1
Elect principles -_ac_circuits_year1
 
Elect principles -_ac_waveform_year1
Elect principles -_ac_waveform_year1Elect principles -_ac_waveform_year1
Elect principles -_ac_waveform_year1
 
Elect principles -_resistance
Elect principles -_resistanceElect principles -_resistance
Elect principles -_resistance
 
Components the diode
Components   the diodeComponents   the diode
Components the diode
 
Elect principles -_kirchhoffs_laws
Elect principles -_kirchhoffs_lawsElect principles -_kirchhoffs_laws
Elect principles -_kirchhoffs_laws
 
Binary Slides
Binary Slides Binary Slides
Binary Slides
 
Numebr system
Numebr systemNumebr system
Numebr system
 
Numbering system dental anatomy
Numbering system  dental anatomyNumbering system  dental anatomy
Numbering system dental anatomy
 
Number system
Number systemNumber system
Number system
 
Binary code - Beginning
Binary code - BeginningBinary code - Beginning
Binary code - Beginning
 
number system school ppt ninth class
number system school ppt ninth classnumber system school ppt ninth class
number system school ppt ninth class
 
Computer number systems
Computer number systemsComputer number systems
Computer number systems
 
Number System
Number SystemNumber System
Number System
 
BINARY NUMBER SYSTEM
BINARY NUMBER SYSTEMBINARY NUMBER SYSTEM
BINARY NUMBER SYSTEM
 
Amcat 3-DOWNLOAD ENABLED
Amcat 3-DOWNLOAD ENABLEDAmcat 3-DOWNLOAD ENABLED
Amcat 3-DOWNLOAD ENABLED
 
Introduction to the Binary Number System
Introduction to the Binary Number SystemIntroduction to the Binary Number System
Introduction to the Binary Number System
 
Number system
Number systemNumber system
Number system
 
number system
number systemnumber system
number system
 

Ähnlich wie Computers numbering systems

Ähnlich wie Computers numbering systems (20)

DLD-Introduction.pptx
DLD-Introduction.pptxDLD-Introduction.pptx
DLD-Introduction.pptx
 
04 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa1604 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa16
 
Number system
Number systemNumber system
Number system
 
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
 
DCF QNA edited
DCF QNA editedDCF QNA edited
DCF QNA edited
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 
1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM1.1.1 BINARY SYSTEM
1.1.1 BINARY SYSTEM
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
 
DLD Chapter-1.pdf
DLD Chapter-1.pdfDLD Chapter-1.pdf
DLD Chapter-1.pdf
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptx
 
Computer Number system
Computer Number systemComputer Number system
Computer Number system
 
numbersystem-211022083557.pdf
numbersystem-211022083557.pdfnumbersystem-211022083557.pdf
numbersystem-211022083557.pdf
 
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
 
Number system
Number system Number system
Number system
 
Number system
Number system  Number system
Number system
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Digital Logic
Digital LogicDigital Logic
Digital Logic
 
binarycode.pptx
binarycode.pptxbinarycode.pptx
binarycode.pptx
 

Mehr von sld1950

Machines dc motors
Machines   dc motorsMachines   dc motors
Machines dc motors
sld1950
 
Elect principles capacitance
Elect principles   capacitanceElect principles   capacitance
Elect principles capacitance
sld1950
 
Electronics amplifiers
Electronics   amplifiersElectronics   amplifiers
Electronics amplifiers
sld1950
 
Electronics noise
Electronics   noiseElectronics   noise
Electronics noise
sld1950
 
Electronics decibel
Electronics   decibelElectronics   decibel
Electronics decibel
sld1950
 
Components passive
Components   passiveComponents   passive
Components passive
sld1950
 
Components transistors
Components   transistorsComponents   transistors
Components transistors
sld1950
 
Components operational amplifiers
Components  operational amplifiersComponents  operational amplifiers
Components operational amplifiers
sld1950
 
Components the diode
Components   the diodeComponents   the diode
Components the diode
sld1950
 
Components 555 timer
Components   555 timerComponents   555 timer
Components 555 timer
sld1950
 
Components resistors
Components   resistorsComponents   resistors
Components resistors
sld1950
 

Mehr von sld1950 (11)

Machines dc motors
Machines   dc motorsMachines   dc motors
Machines dc motors
 
Elect principles capacitance
Elect principles   capacitanceElect principles   capacitance
Elect principles capacitance
 
Electronics amplifiers
Electronics   amplifiersElectronics   amplifiers
Electronics amplifiers
 
Electronics noise
Electronics   noiseElectronics   noise
Electronics noise
 
Electronics decibel
Electronics   decibelElectronics   decibel
Electronics decibel
 
Components passive
Components   passiveComponents   passive
Components passive
 
Components transistors
Components   transistorsComponents   transistors
Components transistors
 
Components operational amplifiers
Components  operational amplifiersComponents  operational amplifiers
Components operational amplifiers
 
Components the diode
Components   the diodeComponents   the diode
Components the diode
 
Components 555 timer
Components   555 timerComponents   555 timer
Components 555 timer
 
Components resistors
Components   resistorsComponents   resistors
Components resistors
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
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
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+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...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
+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...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
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
 

Computers numbering systems

  • 1. Computers – Numbering Systems The Binary System This is a numbering system to the base of two, meaning that it only has two digits 0 and 1. The binary system is the base numbering system used in computer and digital logic control systems. Binary numbers are written as a sequence of zero’s and one’s, where: 0101; 1000; 1001 are examples of four-bit binary numbers. Weighting Each column in the binary number represents a denary number as shown below and doubles with each column. This is called the ‘weighting’ of the numbering system. Each 1 or 0 multiplies a successive power of 2. 8 4 2 1 LSBMSB 23 22 21 20 Bin 1 1 0 1 = (1x8) + (1x4) + (0x2) + (1x1)= 13d
  • 2. Computers – Numbering Systems The Hexadecimal System Numbers in the binary system tend to get very long, the hex system is more compact and less prone to error. Each column represents a successive power of sixteen (base 16). Hex symbols 0 – 9 for decimal 0 – 9 and A to F for decimal 10 to 15. 256 16 1 162 161 160 Hex 2 3 4 = (2x256) + (3x16) + (4x1) = 564d Decimal Binary Hex 101 (10) 100 (1) 24 (16) 23 (8) 22 (4) 21 (2) 20 (1) 161 (16) 160 (1) 0 7 0 0 1 1 1 0 7 1 0 0 1 0 1 0 0 A 1 2 0 1 1 0 0 0 C 1 5 0 1 1 1 1 0 F 2 7 1 1 0 1 1 1 8
  • 3. Computers – Numbering Systems The Hexadecimal System To write a binary number in hexadecimal group the number into four-bit groups beginning with the LSB and write the hex equivalent of each group. Example Decimal 245 = 11110101 Group into four bits, = 1111 0101 Hex = F 5 Decimal 245 = F5 (Hex) The Octal System A base-8 system from an early era, used during the development of the first computer systems and is not commonly used these days. Although it does not require the extra symbols (A-F “hex”) it is extremely awkward when applied to byte-organised words of today’s computer systems.
  • 4. BINARY CODED DECIMAL (BCD) By converting (encoding) each decimal digit into a four-bit binary group we obtain a system called Binary Coded Decimal (BCD). This system is ideal for use when we wish to display a decimal digit from its binary equivalent eg digital displays. Each four-bit group is binary weighted and represents a single digit. Computers – Numbering Systems Example Decimal 245 = 2 4 5 BCD = 0010 0100 0101
  • 5. Computers – Numbering Systems 2. State the decimal equivalents represented by the binary numbers shown below, a) 01100101, b) 10110011, c) 10111101. Assessment 1. Write down the binary equivalents for denary numbers 0 to 12, 28, 32 and 64. 3. State the hexadecimal equivalents for the denary numbers shown below, a) 8, b) 12, c) 18, d) 28. 4. Convert the binary numbers in question 2 to their hexadecimal equivalents. 5. Convert the binary numbers in question 2 to their BCD equivalents.
  • 6. ASCII CODE This is the American Standard Code for Information Interchange. It is a method of coding alphabetic, numeric and punctuation characters into groups of 7-bits. Computers – Coding Systems Char Hex Dec Char Hex Dec A 41H 65 a 61H 97 B 42H 66 b 62H 98 C 43H 67 c 63H 99 0 30H 48 5CH 92 1 31H 49 ] 5DH 93 2 32H 50 < 3CH 60
  • 7. GRAY CODE The Gray code is used for mechanical shaft-angle encoders, the feature of this code is that only one bit changes in going from one state to the next. This method prevents errors, since there is no way of guaranteeing that all bits will change simultaneously at the boundary between two encoded states. Computers – Coding Systems Position Gray Code Position Gray Code 0 0000 8 1100 1 0001 9 1101 2 0011 10 1111 3 0010 11 1110 4 0110 12 1010 5 0111 13 1011 6 0101 14 1001 7 0100 15 1000 D0 D1 D2 D3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 position LED’s
  • 8. 2’s COMPLEMENT The “2’s complement” is the method most widely used for integer computation in electronic systems. To obtain a negative number (2’s complement) first complement each bit of the positive number then add 1. Computers – Arithmetic Operations Check this by adding the original positive number to the 2’s complement representation. The result should be zero, since the 2’s complement changes the sign of the original positive number. Example Decimal 5 = 0101 1’s complement = 1010 +1 (2’s complement) = 1011
  • 9. Using the 2’s Complement Subtract B from A, take the 2’s complement of B (create a negative of B) then add this to A. Computers – Arithmetic Operations Example 5 - 2 = 5 + (-2) 2 = 0010 1’s complement = 110 +1 (2’s complement) = 1110 5 = 0101 Add = 0011 = 3
  • 10. Computers – Data Systems BITS to GIGABYTES The bit is short for binary digit and has two values (0 or 1) When four binary bits are grouped together they form a nybble, ‘0110’ and ‘1110’. When two nibbles, (eight binary bits) are grouped together they form a byte,‘10110101’ and ‘00110111’. A word is the term used to represent the unit of data in a particular system. In an eight bit system the word contains eight bits. Personal computers today use 32 and 64 bit words while pic’s and micro- controller’s and Z80cpu systems use four and eight bit words.
  • 11. Computers – Data Systems BITS to GIGABYTES – Common Units of Measure Kilobyte (kB) – Describes the data storage capacity of small systems e.g. memory capacity for micro-controllers and size of data files. 1kB = 1024 bytes (210 bytes). Megabyte (MB) – Describes the data storage capacity of memory devices, image files (bitmaps). 1MB = 1024 kB (220 bytes). Gigabyte (GB) – Describes the data storage capacity of hard drives, CD/DVD data storage devices. The gigabyte is the largest unit of capacity in use at present. 1GB = 1024 MB (230 bytes).