SlideShare a Scribd company logo
1 of 32
Download to read offline
INTRODUCTION TO COMPUTER
SYSTEM
CSC 2313
LECTURE 3
Department of Maths and Computer-Science
Faculty of Natural andApplied Science
BY
UMAR DANJUMA MAIWADA
OBJECTIVES
 This part of the course describes various digital number
systems.
2
INTRODUCTION
 It is the base of a system.
 A value of each digit in a number can be determined
using the digit, the number’s position etc
3
DIGITAL NUMBER SYSTEM
 It can understand positional number system only where there
are a few symbols called digits and these symbols represent
different values depending on the position they occupy in the
number.
4
BINARY NUMBER SYSTEM
 It is a number expressed in base two
 It represent a numeric value using two different symbols: 0 and
1
 Each digit is referred to as a bit
0001 numeric value 20
0010 numeric value 21
0100 numeric value 22
1000 numeric value 23
5
6
2 24
2 12 R 0
2 6 R 0
2 3 R 0
2 1 R 1
0 R 1
= 110002
Example
Decimal Number = 24
Equivalent binary
7
Example
Binary Number: 101012
Calculating Decimal Equivalent:
.
DECIMAL NUMBER SYSTEM
 It employs 10 as the base
 It requires 10 different numerals
 It is called Denary
8
9
Example
1234
(1x1000) + (2x100) + (3x10) + (4xl)
(1x103) + (2x102) + (3x101) + (4×100)
1000 + 200 + 30 + 4
1234
Each position represents a specific power of the base (10).
For example, the decimal number 1234 consists of the
digit 4 in the units position, 3 in the tens position, 2 in
the hundreds position, and 1 in the thousands position
10
OCTAL NUMBER SYSTEM
 It is base 8 number system
 Uses eight digits, 0,1,2,3,4,5,6,7.
 Also called base 8 number system.
11
12
Example
Octal Number: 125708
Calculating Decimal Equivalent:
Example
Decimal Number: 5496
Calculating octal Equivalent
8 5496
8 687 R 0
8 85 R 7
8 10 R 5
8 1 R 2
0 R 1
= 125708
HEXADECIMAL NUMBER SYSTEM
 Uses 10 digits and 6 letters, 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
 Base 16
 They are used by designers and programmers
 Each hexadecimal digit represent four binary digits
 Also called base 16 number system
14
EXAMPLE
HEXADECIMAL NUMBER: 19FDE16
CALCULATING DECIMAL EQUIVALENT:
16
17
Example
Decimal Number: 106462
Calculating hexadecimal Equivalent:
16 106462
16 6653 R 14
16 415 R 13
16 25 R 15
16 1 R 9
0 R 1
= 1 9 15 13 1416
= 19FDE16
Number System Conversion
This section discusses techniques to convert one number system to another
number system.There are many methods or techniques which can
be used to convert numbers from one base to another.We'll
demonstrate here the following:
 Decimal to Other Base System
 Other Base System to Decimal
 Other Base System to Non-Decimal
 Shortcut method - Binary to Octal
 Shortcut method - Octal to Binary
 Shortcut method - Binary to Hexadecimal
 Shortcut method - Hexadecimal to Binary 18
BASE 10 TO BASE N CONVERSION
Steps
 Step 1 - Divide the decimal number to be converted by the value of the
new base.
 Step 2 - Get the remainder from Step 1 as the rightmost digit (least
significant digit) of new base number.
 Step 3 - Divide the quotient of the previous divide by the new base.
 Step 4 - Record the remainder from Step 3 as the next digit (to the left) of
the new base
 number.
 Repeat Steps 3 and 4, getting remainders from right to left, until the
quotient becomes zero in
 Step 3.
 The last remainder thus obtained will be the most significant digit (MSD) of
the new base
 number.
19
SIGNED BINARY NUMBER CONVENTIONS
Signed Binary Number Representations (3 methods)
 Signed Magnitude (SM)
 Easiest for people to read (Not used by computers)
 Here is an example of Signed Magnitude number with 4-bit
word size
20
Binary SM numbers for n-bit word ranges from +(2 – 1) to - (2 – 1)
21
Example of complete list of binary SM numbers for a 4-bit word.
DIMINISHED RADIX COMPLEMENT (DRC) OR 1’S COMPLEMENT
SOME COMPUTER SYSTEMS USE THIS INFORMATION BECAUSE IT IS EASIER TO CONVERT.
TO OBTAIN A NEGATIVE DRC OR 1’S COMPLEMENT:
WRITE A POSITIVE NUMBER WITH MSB SET TO 0 (POSITIVE SIGN)
NEGATE (INVERT) EVERY BIT INCLUDING SIGN BIT TO OBTAIN THE NEGATIVE
NUMBER.
HERE IS AN EXAMPLE OF 4-BIT WORD SIZE:
22
DRC numbers for n-bit word ranges from +(2n-1 – 1) to –(2n-1– 1)
23
Example of Binary DRC or 1’s Complement Numbers for a 4-bit word
RADIX COMPLEMENT (RC) OR 2’S COMPLEMENT
MAJORITY OF DIGITAL SYSTEMS USE RC SINCE IT
SIMPLIFIES THE BINARY ARITHMETIC OPERATION.
TO OBTAIN A NEGATIVE RC OR 2’S COMPLEMENT:
WRITE A POSITIVE NUMBER WITH THE MSB SET TO 0
(POSITIVE SIGN)
NEGATE (INVERT) EVERY BIT INCLUDING SIGN BIT
ADD A 1 TO THE RESULT TO OBTAIN THE NEGATIVE NUMBER
BINARY ARITHMETIC
+7 _ 0 1 1 1
+(-2) _ 1 1 1 0
----------
0 1 0 1 “Ignore the left-most carry, and the result is +5”
Addition of Unsigned Binary Numbers
Unsigned addition Signed works exactly the same way as singed addition, allowing us to
use the same circuitry.
+7 _ 0 1 1 1
+3 _ 0 0 1 1
----------
1 0 1 0 “Result is +10. If there is a carry beyond the available bits, then an
overflow has occurred.
25
FIXED PRECISION AND OVERFLOW.
 computer systems, this isn’t the case. Numbers in computers are
typically represented using a fixed number of bits.These sizes are
typically 8 bits, 16 bits, 32 bits, 64 bits and 80 bits.These sizes are
generally a multiple of 8, as most computer memories are organized
on an 8 bit byte basis.
 Numbers in which a specific number of bits are used to represent the
value are called fixed precision numbers.When a specific number of
bits are used to represent a number, that determines the range of
possible values that can be represented.
 For example, there are 256 possible combinations of 8 bits, therefore
an 8 bit number can represent 256 distinct numeric values and the
range is typically considered to be 0-255.Any number larger than
255 can’t be represented using 8 bits. Similarly, 16 bits allows a range
of 0-65535.
26
SIGNED AND UNSIGNED NUMBERS
 we have only considered positive values for binary numbers.When a
fixed precision binary number is used to hold only positive values, it is
said to be unsigned. In this case, the range of positive values that can be
represented is 0 -- 2n-1, where n is the number of bits used. It is also
possible to represent signed (negative as well as positive) numbers in
binary. In this case, part of the total range of values is used to
represent positive values, and the rest of the range is used to represent
negative values.
 There are several ways that signed numbers can be represented in
binary, but the most common representation used today is called two’s
complement.The term two’s complement is somewhat ambiguous, in
that it is used in two different ways. First, as a representation, two’s
complement is a way of interpreting and assigning meaning to a bit
pattern contained in a fixed precision binary quantity.
27
DETECTING OVERFLOW
Unsigned number addition
If the addition has a carry beyond the available bits then an overflow
has occurred.
Signed (RC, 2’s complement) number addition
 If the operands have different signs, then overflow cannot
occur, since one number is
being subtracted from the other.
 If the operands have the same sign and the result has a
different sign, then an overflow has occurred.A quick way
to identify an overflow situation is when the carry into the
sign-bit position and the carry out of sign-bit position are
different. 28
29
Binary coded decimal (BCD)
BCD assigns 4 binary bits to each binary digit. The only drawback is that only 0 to 9 are used,
and the other 6 combinations from 10 to 15 are not used.
BCD Digits
0 ................ 0000
1 ................ 0001
2 ................ 0010
3 ................ 0011
4 ................ 0100
5 ................ 0101
6 ................ 0110
7 ................ 0111
8 ................ 1000
9 ................ 1001
30
Equivalent Numbers in Decimal, Binary and Hexadecimal Notation:
Decimal Binary Hexadecimal
0 00000000 00
1 00000001 01
2 00000010 02
3 00000011 03
4 00000100 04
5 00000101 05
6 00000110 06
7 00000111 07
8 00001000 08
9 00001001 09
10 00001010 0A
11 00001011 0B
12 00001100 0C
13 00001101 0D
14 00001110 0E
15 00001111 0F
REFERENCES
 Number Systems, Base Conversions, and Computer Data
Representation
 An introduction to binary, hexadecimal and octal
 Computer Number system tutorials point
31
QUESTIONS???
THANK YOU FOR YOUR ATTENTION
32

More Related Content

What's hot

Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray code
Bala Ganesh
 
Topic 1 Data Representation
Topic 1 Data RepresentationTopic 1 Data Representation
Topic 1 Data Representation
ekul
 
Lec 02 data representation part 2
Lec 02 data representation part 2Lec 02 data representation part 2
Lec 02 data representation part 2
Abdul Khan
 

What's hot (20)

Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray code
 
Topic 1 Data Representation
Topic 1 Data RepresentationTopic 1 Data Representation
Topic 1 Data Representation
 
Data representation
 Data representation Data representation
Data representation
 
Number System
Number SystemNumber System
Number System
 
Bcd to excess 3 code converter
Bcd to excess 3 code converterBcd to excess 3 code converter
Bcd to excess 3 code converter
 
Introduction of number system
Introduction of number systemIntroduction of number system
Introduction of number system
 
Data representation
Data representationData representation
Data representation
 
Binary codes
Binary codesBinary codes
Binary codes
 
Data Representation
Data RepresentationData Representation
Data Representation
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
 
Error detection and correction codes r006
Error detection and correction codes   r006Error detection and correction codes   r006
Error detection and correction codes r006
 
Data representation
Data representationData representation
Data representation
 
Computerarchitecture by csa
Computerarchitecture by csaComputerarchitecture by csa
Computerarchitecture by csa
 
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 )
 
Number Systems Basic Concepts
Number Systems Basic ConceptsNumber Systems Basic Concepts
Number Systems Basic Concepts
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversions
 
Lec 02 data representation part 2
Lec 02 data representation part 2Lec 02 data representation part 2
Lec 02 data representation part 2
 
DIGITAL DESIGN
DIGITAL DESIGNDIGITAL DESIGN
DIGITAL DESIGN
 
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,...
 
Binary codes
Binary codesBinary codes
Binary codes
 

Similar to Csc 2313 (lecture 3)

Lec 02 data representation part 1
Lec 02 data representation part 1Lec 02 data representation part 1
Lec 02 data representation part 1
Abdul Khan
 

Similar to Csc 2313 (lecture 3) (20)

Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes
 
digital-180612132737.pdf
digital-180612132737.pdfdigital-180612132737.pdf
digital-180612132737.pdf
 
Data representation
Data representationData representation
Data representation
 
IS 139 Lecture 4 - 2015
IS 139 Lecture 4 - 2015IS 139 Lecture 4 - 2015
IS 139 Lecture 4 - 2015
 
IS 139 Lecture 4
IS 139 Lecture 4IS 139 Lecture 4
IS 139 Lecture 4
 
dtei-180910104911-converted.pptx
dtei-180910104911-converted.pptxdtei-180910104911-converted.pptx
dtei-180910104911-converted.pptx
 
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
Number system Number system
Number system
 
Anup Barman number system electronicdevice ECE.pptx
Anup Barman number system electronicdevice ECE.pptxAnup Barman number system electronicdevice ECE.pptx
Anup Barman number system electronicdevice ECE.pptx
 
Data repersentation.
Data repersentation.Data repersentation.
Data repersentation.
 
Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.ppt
 
Lec 02 data representation part 1
Lec 02 data representation part 1Lec 02 data representation part 1
Lec 02 data representation part 1
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptx
 
Unit 1 data representation and computer arithmetic
Unit 1  data representation and computer arithmeticUnit 1  data representation and computer arithmetic
Unit 1 data representation and computer arithmetic
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number system
 
Data Representation
Data RepresentationData Representation
Data Representation
 
data representation
 data representation data representation
data representation
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
 
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
 

More from umardanjumamaiwada

Seminar Information Protection & Computer Security (Cryptography).pptx
Seminar Information Protection & Computer Security  (Cryptography).pptxSeminar Information Protection & Computer Security  (Cryptography).pptx
Seminar Information Protection & Computer Security (Cryptography).pptx
umardanjumamaiwada
 

More from umardanjumamaiwada (20)

Seminar Information Protection & Computer Security (Cryptography).pptx
Seminar Information Protection & Computer Security  (Cryptography).pptxSeminar Information Protection & Computer Security  (Cryptography).pptx
Seminar Information Protection & Computer Security (Cryptography).pptx
 
Oop using JAVA
Oop using JAVAOop using JAVA
Oop using JAVA
 
C++
C++ C++
C++
 
Computer hardware
Computer hardware Computer hardware
Computer hardware
 
2javascript web programming with JAVA script
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA script
 
1 web programming
1 web programming1 web programming
1 web programming
 
0 csc 3311 slide internet programming
0 csc 3311 slide internet programming0 csc 3311 slide internet programming
0 csc 3311 slide internet programming
 
0 lecture 6 wp wireless protocol
0 lecture 6 wp wireless protocol0 lecture 6 wp wireless protocol
0 lecture 6 wp wireless protocol
 
0 lecture 5 wp wireless protocol
0 lecture 5 wp wireless protocol0 lecture 5 wp wireless protocol
0 lecture 5 wp wireless protocol
 
0 lecture 4 wp wireless protocol
0 lecture 4 wp wireless protocol0 lecture 4 wp wireless protocol
0 lecture 4 wp wireless protocol
 
0 lecture 3 wp wireless protocol
0 lecture 3 wp wireless protocol0 lecture 3 wp wireless protocol
0 lecture 3 wp wireless protocol
 
0 lecture 2 wp wireless protocol
0 lecture 2 wp wireless protocol0 lecture 2 wp wireless protocol
0 lecture 2 wp wireless protocol
 
0 lecture 1 wp wireless protocol
0 lecture 1 wp wireless protocol0 lecture 1 wp wireless protocol
0 lecture 1 wp wireless protocol
 
lecture 5
 lecture 5 lecture 5
lecture 5
 
lecture 4
 lecture 4 lecture 4
lecture 4
 
lecture 3
 lecture 3  lecture 3
lecture 3
 
lecture 2
 lecture 2 lecture 2
lecture 2
 
lecture 1
 lecture 1 lecture 1
lecture 1
 
lecture 6
 lecture 6 lecture 6
lecture 6
 
lecture 5
 lecture 5 lecture 5
lecture 5
 

Recently uploaded

Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.
Silpa
 
LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.
Silpa
 

Recently uploaded (20)

PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICEPATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
 
Molecular markers- RFLP, RAPD, AFLP, SNP etc.
Molecular markers- RFLP, RAPD, AFLP, SNP etc.Molecular markers- RFLP, RAPD, AFLP, SNP etc.
Molecular markers- RFLP, RAPD, AFLP, SNP etc.
 
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIACURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
CURRENT SCENARIO OF POULTRY PRODUCTION IN INDIA
 
Genome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptxGenome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptx
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.
 
LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.
 
Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its Functions
 
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
 
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRLGwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx300003-World Science Day For Peace And Development.pptx
300003-World Science Day For Peace And Development.pptx
 
Role of AI in seed science Predictive modelling and Beyond.pptx
Role of AI in seed science  Predictive modelling and  Beyond.pptxRole of AI in seed science  Predictive modelling and  Beyond.pptx
Role of AI in seed science Predictive modelling and Beyond.pptx
 
module for grade 9 for distance learning
module for grade 9 for distance learningmodule for grade 9 for distance learning
module for grade 9 for distance learning
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptx
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
Chemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdfChemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdf
 
FAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceFAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical Science
 
Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.
 

Csc 2313 (lecture 3)

  • 1. INTRODUCTION TO COMPUTER SYSTEM CSC 2313 LECTURE 3 Department of Maths and Computer-Science Faculty of Natural andApplied Science BY UMAR DANJUMA MAIWADA
  • 2. OBJECTIVES  This part of the course describes various digital number systems. 2
  • 3. INTRODUCTION  It is the base of a system.  A value of each digit in a number can be determined using the digit, the number’s position etc 3
  • 4. DIGITAL NUMBER SYSTEM  It can understand positional number system only where there are a few symbols called digits and these symbols represent different values depending on the position they occupy in the number. 4
  • 5. BINARY NUMBER SYSTEM  It is a number expressed in base two  It represent a numeric value using two different symbols: 0 and 1  Each digit is referred to as a bit 0001 numeric value 20 0010 numeric value 21 0100 numeric value 22 1000 numeric value 23 5
  • 6. 6 2 24 2 12 R 0 2 6 R 0 2 3 R 0 2 1 R 1 0 R 1 = 110002 Example Decimal Number = 24 Equivalent binary
  • 8. DECIMAL NUMBER SYSTEM  It employs 10 as the base  It requires 10 different numerals  It is called Denary 8
  • 9. 9 Example 1234 (1x1000) + (2x100) + (3x10) + (4xl) (1x103) + (2x102) + (3x101) + (4×100) 1000 + 200 + 30 + 4 1234 Each position represents a specific power of the base (10). For example, the decimal number 1234 consists of the digit 4 in the units position, 3 in the tens position, 2 in the hundreds position, and 1 in the thousands position
  • 10. 10
  • 11. OCTAL NUMBER SYSTEM  It is base 8 number system  Uses eight digits, 0,1,2,3,4,5,6,7.  Also called base 8 number system. 11
  • 13. Example Decimal Number: 5496 Calculating octal Equivalent 8 5496 8 687 R 0 8 85 R 7 8 10 R 5 8 1 R 2 0 R 1 = 125708
  • 14. HEXADECIMAL NUMBER SYSTEM  Uses 10 digits and 6 letters, 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F  Base 16  They are used by designers and programmers  Each hexadecimal digit represent four binary digits  Also called base 16 number system 14
  • 15.
  • 17. 17 Example Decimal Number: 106462 Calculating hexadecimal Equivalent: 16 106462 16 6653 R 14 16 415 R 13 16 25 R 15 16 1 R 9 0 R 1 = 1 9 15 13 1416 = 19FDE16
  • 18. Number System Conversion This section discusses techniques to convert one number system to another number system.There are many methods or techniques which can be used to convert numbers from one base to another.We'll demonstrate here the following:  Decimal to Other Base System  Other Base System to Decimal  Other Base System to Non-Decimal  Shortcut method - Binary to Octal  Shortcut method - Octal to Binary  Shortcut method - Binary to Hexadecimal  Shortcut method - Hexadecimal to Binary 18
  • 19. BASE 10 TO BASE N CONVERSION Steps  Step 1 - Divide the decimal number to be converted by the value of the new base.  Step 2 - Get the remainder from Step 1 as the rightmost digit (least significant digit) of new base number.  Step 3 - Divide the quotient of the previous divide by the new base.  Step 4 - Record the remainder from Step 3 as the next digit (to the left) of the new base  number.  Repeat Steps 3 and 4, getting remainders from right to left, until the quotient becomes zero in  Step 3.  The last remainder thus obtained will be the most significant digit (MSD) of the new base  number. 19
  • 20. SIGNED BINARY NUMBER CONVENTIONS Signed Binary Number Representations (3 methods)  Signed Magnitude (SM)  Easiest for people to read (Not used by computers)  Here is an example of Signed Magnitude number with 4-bit word size 20 Binary SM numbers for n-bit word ranges from +(2 – 1) to - (2 – 1)
  • 21. 21 Example of complete list of binary SM numbers for a 4-bit word.
  • 22. DIMINISHED RADIX COMPLEMENT (DRC) OR 1’S COMPLEMENT SOME COMPUTER SYSTEMS USE THIS INFORMATION BECAUSE IT IS EASIER TO CONVERT. TO OBTAIN A NEGATIVE DRC OR 1’S COMPLEMENT: WRITE A POSITIVE NUMBER WITH MSB SET TO 0 (POSITIVE SIGN) NEGATE (INVERT) EVERY BIT INCLUDING SIGN BIT TO OBTAIN THE NEGATIVE NUMBER. HERE IS AN EXAMPLE OF 4-BIT WORD SIZE: 22 DRC numbers for n-bit word ranges from +(2n-1 – 1) to –(2n-1– 1)
  • 23. 23 Example of Binary DRC or 1’s Complement Numbers for a 4-bit word
  • 24. RADIX COMPLEMENT (RC) OR 2’S COMPLEMENT MAJORITY OF DIGITAL SYSTEMS USE RC SINCE IT SIMPLIFIES THE BINARY ARITHMETIC OPERATION. TO OBTAIN A NEGATIVE RC OR 2’S COMPLEMENT: WRITE A POSITIVE NUMBER WITH THE MSB SET TO 0 (POSITIVE SIGN) NEGATE (INVERT) EVERY BIT INCLUDING SIGN BIT ADD A 1 TO THE RESULT TO OBTAIN THE NEGATIVE NUMBER
  • 25. BINARY ARITHMETIC +7 _ 0 1 1 1 +(-2) _ 1 1 1 0 ---------- 0 1 0 1 “Ignore the left-most carry, and the result is +5” Addition of Unsigned Binary Numbers Unsigned addition Signed works exactly the same way as singed addition, allowing us to use the same circuitry. +7 _ 0 1 1 1 +3 _ 0 0 1 1 ---------- 1 0 1 0 “Result is +10. If there is a carry beyond the available bits, then an overflow has occurred. 25
  • 26. FIXED PRECISION AND OVERFLOW.  computer systems, this isn’t the case. Numbers in computers are typically represented using a fixed number of bits.These sizes are typically 8 bits, 16 bits, 32 bits, 64 bits and 80 bits.These sizes are generally a multiple of 8, as most computer memories are organized on an 8 bit byte basis.  Numbers in which a specific number of bits are used to represent the value are called fixed precision numbers.When a specific number of bits are used to represent a number, that determines the range of possible values that can be represented.  For example, there are 256 possible combinations of 8 bits, therefore an 8 bit number can represent 256 distinct numeric values and the range is typically considered to be 0-255.Any number larger than 255 can’t be represented using 8 bits. Similarly, 16 bits allows a range of 0-65535. 26
  • 27. SIGNED AND UNSIGNED NUMBERS  we have only considered positive values for binary numbers.When a fixed precision binary number is used to hold only positive values, it is said to be unsigned. In this case, the range of positive values that can be represented is 0 -- 2n-1, where n is the number of bits used. It is also possible to represent signed (negative as well as positive) numbers in binary. In this case, part of the total range of values is used to represent positive values, and the rest of the range is used to represent negative values.  There are several ways that signed numbers can be represented in binary, but the most common representation used today is called two’s complement.The term two’s complement is somewhat ambiguous, in that it is used in two different ways. First, as a representation, two’s complement is a way of interpreting and assigning meaning to a bit pattern contained in a fixed precision binary quantity. 27
  • 28. DETECTING OVERFLOW Unsigned number addition If the addition has a carry beyond the available bits then an overflow has occurred. Signed (RC, 2’s complement) number addition  If the operands have different signs, then overflow cannot occur, since one number is being subtracted from the other.  If the operands have the same sign and the result has a different sign, then an overflow has occurred.A quick way to identify an overflow situation is when the carry into the sign-bit position and the carry out of sign-bit position are different. 28
  • 29. 29 Binary coded decimal (BCD) BCD assigns 4 binary bits to each binary digit. The only drawback is that only 0 to 9 are used, and the other 6 combinations from 10 to 15 are not used. BCD Digits 0 ................ 0000 1 ................ 0001 2 ................ 0010 3 ................ 0011 4 ................ 0100 5 ................ 0101 6 ................ 0110 7 ................ 0111 8 ................ 1000 9 ................ 1001
  • 30. 30 Equivalent Numbers in Decimal, Binary and Hexadecimal Notation: Decimal Binary Hexadecimal 0 00000000 00 1 00000001 01 2 00000010 02 3 00000011 03 4 00000100 04 5 00000101 05 6 00000110 06 7 00000111 07 8 00001000 08 9 00001001 09 10 00001010 0A 11 00001011 0B 12 00001100 0C 13 00001101 0D 14 00001110 0E 15 00001111 0F
  • 31. REFERENCES  Number Systems, Base Conversions, and Computer Data Representation  An introduction to binary, hexadecimal and octal  Computer Number system tutorials point 31
  • 32. QUESTIONS??? THANK YOU FOR YOUR ATTENTION 32