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 codeBala Ganesh
 
Topic 1 Data Representation
Topic 1 Data RepresentationTopic 1 Data Representation
Topic 1 Data Representationekul
 
Data representation
 Data representation Data representation
Data representationAshraf Miraz
 
Bcd to excess 3 code converter
Bcd to excess 3 code converterBcd to excess 3 code converter
Bcd to excess 3 code converterUshaswini Chowdary
 
Introduction of number system
Introduction of number systemIntroduction of number system
Introduction of number systemAswiniT3
 
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...Arti Parab Academics
 
Error detection and correction codes r006
Error detection and correction codes   r006Error detection and correction codes   r006
Error detection and correction codes r006arunachalamr16
 
Computerarchitecture by csa
Computerarchitecture by csaComputerarchitecture by csa
Computerarchitecture by csabathala sudhakar
 
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 )MdFazleRabbi18
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversionsSusantha Herath
 
Lec 02 data representation part 2
Lec 02 data representation part 2Lec 02 data representation part 2
Lec 02 data representation part 2Abdul Khan
 
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,...ArtemKovera
 

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 Introduction to Digital Number Systems and Computer Data Representation

Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes VandanaPagar1
 
Data representation
Data representationData representation
Data representationManish Kumar
 
IS 139 Lecture 4 - 2015
IS 139 Lecture 4 - 2015IS 139 Lecture 4 - 2015
IS 139 Lecture 4 - 2015Aron Kondoro
 
IS 139 Lecture 4
IS 139 Lecture 4IS 139 Lecture 4
IS 139 Lecture 4wajanga
 
dtei-180910104911-converted.pptx
dtei-180910104911-converted.pptxdtei-180910104911-converted.pptx
dtei-180910104911-converted.pptxdeepaMS4
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxMinahilUmar1
 
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.pptxanupbarmancoochbehar
 
Data repersentation.
Data repersentation.Data repersentation.
Data repersentation.Ritesh Saini
 
Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptMarlonMagtibay2
 
Lec 02 data representation part 1
Lec 02 data representation part 1Lec 02 data representation part 1
Lec 02 data representation part 1Abdul Khan
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptxbmangesh
 
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 arithmeticAmrutaMehata
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number systemAswiniT3
 
data representation
 data representation data representation
data representationHaroon_007
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.pptzorogoh2
 
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_fa16John Todora
 

Similar to Introduction to Digital Number Systems and Computer Data Representation (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 (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

Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRlizamodels9
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024AyushiRastogi48
 
Temporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of MasticationTemporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of Masticationvidulajaib
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaPraksha3
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsHajira Mahmood
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)DHURKADEVIBASKAR
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptArshadWarsi13
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxpriyankatabhane
 
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfSwapnil Therkar
 
Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2John Carlo Rollon
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxyaramohamed343013
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Twin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptxTwin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptxEran Akiva Sinbar
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
 

Recently uploaded (20)

Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCRCall Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
Call Girls In Nihal Vihar Delhi ❤️8860477959 Looking Escorts In 24/7 Delhi NCR
 
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024
 
Temporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of MasticationTemporomandibular joint Muscles of Mastication
Temporomandibular joint Muscles of Mastication
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
Solution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutionsSolution chemistry, Moral and Normal solutions
Solution chemistry, Moral and Normal solutions
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.ppt
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
Speech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptxSpeech, hearing, noise, intelligibility.pptx
Speech, hearing, noise, intelligibility.pptx
 
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
 
Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docx
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Twin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptxTwin's paradox experiment is a meassurement of the extra dimensions.pptx
Twin's paradox experiment is a meassurement of the extra dimensions.pptx
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
 

Introduction to Digital Number Systems and Computer Data Representation

  • 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