SlideShare a Scribd company logo
1
Computer Logic Design
Lecture 2
Number Systems
LECTURERS:DAROON ALI &SAZAN KAMAL
BAYAN UNIVERSITY
Outlines
Base of Number Systems
Decimal Numbers
Binary Numbers
 MSB and LSB
 Binary to Decimal Conversion
 Decimal To Binary Conversion
Hexadecimal Numbers
 Conversions
Octal Numbers
 Conversions
Number Systems
The numeric system we use daily is the decimal system,
 but this system is not convenient for machines
 since the information is handled codified in the shape of On or Off bits;
A base of a number system defines the range of values that a digit may have. For example,
 base 2 Binary number has only Two different values (0 and 1).
 base 10 Decimal number has Ten different values (0,1,2,3,4,5,6,7,8 and 9).
 And etc.…
Decimal Numbers
The position of each digit in a weighted number system is assigned a weight based on the base
of the system.
 The base of decimal numbers is ten, because only ten symbols (0 through 9) are used to represent any
number.
The column weights of decimal numbers are powers of ten that increase from right to left
beginning with 100 =1:
 105 104 103 102 101 100
For fractional decimal numbers, the column weights are negative powers of ten that decrease
from left to right:
 102 101 100. 10-1 10-2 10-3 10-4
Decimal Numbers
Decimal numbers can be expressed as the sum of the products of each digit times the column
value for that digit.
 Thus, the number 9240 can be expressed as
Example: Express the number 480.52 as the sum of values of each digit.
(9 x 103) + (2 x 102) + (4 x 101) + (0 x 100)
or
9 x 1,000 + 2 x 100 + 4 x 10 + 0 x 1
480.52 = (4 x 102) + (8 x 101) + (0 x 100) + (5 x 10-1) +(2 x 10-2)
Binary Numbers
For digital systems, the binary number system is used. Binary has a radix of two and uses the
digits 0 and 1 to represent quantities.
The column weights of binary numbers are powers of two that increase from right to left
beginning with 20 =1:
 …25 24 23 22 21 20.
For fractional binary numbers, the column weights are negative powers of two that decrease
from left to right:
 22 21 20. 2-1 2-2 2-3 2-4 …
LSB and MSB
Binary number can be a stream of 0 and 1
 For Example :
 10010010
 010101
 111001
 1101100
The first bit from the left is called Most Significant Bit (MSB)
 Because of its significance on the number.
The first bit from the right is called Least Significant Bit (LSB)
 Because of its low significance on the number.
1001101
MSB LSB
Second MSB
Binary-to-Decimal Conversion
The decimal equivalent of a binary number can be determined by adding the column values of
all of the bits that are 1 and discarding all of the bits that are 0.
Example: Convert the binary number 100101.01 to decimal.
Solution:
Binary-to-Decimal Conversion
Decimal-to-Binary Conversion
 You can convert a decimal whole number to binary by reversing the procedure.
 Write the decimal weight of each column and place 1’s in the columns that sum to the decimal
number This Method is called Sum - Of - Weights Method.
 Example : Convert the decimal number 49 to binary.
 Solution :
 The column weights double in each position to the right.
 Write down column weights until the last number is larger than the one you want to convert.
Decimal-to-Binary Conversion
Repeated Division-by-2 Method
A systematic method of converting whole numbers from decimal to binary is the repeated
division-by-2 process.
 For example, to convert the decimal number 12 to binary,
 begin by dividing 12 by 2.
 Then divide each resulting quotient by 2 until there is a 0 whole-number quotient.
 The remainders generated by each division form the binary number.
 The first remainder to be produced is the LSB (least significant bit) in the binary number,
 and the last remainder to be produced is the MSB (most significant bit).
 This procedure is shown in the following steps for converting the decimal number 12 to binary.
Decimal-to-Binary Conversion
Decimal-to-Binary Conversion
Example:
 Convert the following decimal
numbers to binary:
 (a) 19 (b) 45
Decimal-to-Binary Conversion
Converting Decimal Fractions to Binary
Sum-oF-Weights
 The sum-of-weights method can be applied to fractional decimal numbers, as shown in the
following example:
 0.625 = 0.5 + 0.125 = 2-1 + 2-3 = 0.101
 There is a 1 in the 2-1 position, a 0 in the 2-2 position, and a 1 in the 2-3 position.
Decimal-to-Binary Conversion
Repeated Multiplication by 2
As you have seen, decimal whole numbers can be converted to binary by
repeated division by 2.
Decimal fractions can be converted to binary by repeated multiplication by 2.
For example, to convert the decimal fraction 0.3125 to binary,
 begin by multiplying 0.3125 by 2
 and then multiplying each resulting fractional part of the product by 2 until the fractional product is
zero or until the desired number of decimal places is reached.
 The carry digits, or carries, generated by the multiplications produce the binary number.
 The first carry produced is the MSB, and the last carry is the LSB. This procedure is illustrated as
follows:
Decimal-to-Binary Conversion
Decimal-to-Binary Conversion
Example : Convert the decimal fraction 0.188 to binary by repeatedly multiplying the fractional
results by 2.
Solution:
Hexadecimal Numbers
The hexadecimal number system has sixteen characters.
They are:
 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Hexadecimal is a weighted number system. The column weights are
powers of 16, which increase from right to left.
4096 256 16 1
163 162 161 160
Hexadecimal Numbers
Binary-to-Hexadecimal Conversion
Converting a binary number to hexadecimal is a straightforward procedure.
Simply break the binary number into 4-bit groups, starting at the right-most bit and replace each
4-bit group with the equivalent hexadecimal symbol.
Hexadecimal-to-Binary Conversion
To convert from a hexadecimal number to a binary number, reverse the process and replace
each hexadecimal symbol with the appropriate four bits.
Hexadecimal-to-Decimal Conversion
One way to find the decimal equivalent of a hexadecimal number is
 first convert the hexadecimal number to binary and then convert from binary to decimal.
Hexadecimal-to-Decimal Conversion
Another way to convert a hexadecimal number to its decimal equivalent is
 multiply the decimal value of each hexadecimal digit by its weight and then take the sum of
these products.
 The weights of a hexadecimal number are increasing powers of 16 (from right to left).
 For a 4-digit hexadecimal number, the weights are
4096 256 16 1
163 162 161 160
Hexadecimal-to-Decimal Conversion
Example : Express 1A2F16 in decimal.
Solution :
 Start by writing the column weights:
 4096 256 16 1
 ( 1 A 2 F)16
= 1(4096) + 10(256) +2(16) +15(1) = 6703
Decimal-to-Hexadecimal Conversion
Repeated division of a decimal number by 16 will produce the equivalent hexadecimal number,
formed by the remainders of the divisions.
The first remainder produced is the least significant Digit (LSD).
Each successive division by 16 yields a remainder that becomes a digit in the equivalent
hexadecimal number.
Decimal-to-Hexadecimal Conversion
Octal Numbers
Like the hexadecimal number system, the octal number system provides a convenient way to
express binary numbers and codes.
The octal number system is composed of eight digits, which are
 0, I, 2, 3, 4, 5, 6, 7
Octal-to-Decimal Conversion
Since the octal number system has a base of eight,
each successive digit position is an increasing power of eight, beginning in the right-most
column with 8°.
The evaluation of an octal number in terms of its decimal equivalent is accomplished by
multiplying each digit by its weight and summing the products,
 as illustrated here for (2374),
Decimal-to-Octal Conversion
A method of converting a decimal number to an octal number is the repeated division-by- 8
method,
Octal-to-Binary Conversion
Because each octal digit can be represented by a 3-bit binary number, it is very easy to convert
from octal to binary. Each octal digit is represented by three bits as shown below.
To convert an octal number to a binary number, simply replace each octal digit with the
appropriate three bits.
Binary-to-Octal Conversion
Conversion of a binary number to an octal number is the reverse of the
octal-to-binary conversion.
The procedure is as follows:
 Start with the right-most group of three bits and, moving from right to left,
 convert each 3-bit group to the equivalent octal digit.
 If there are not three bits available for the left-most group, add either one or two
zeroes to make a complete group.
 These leading zeroes do not affect the value of the binary number
Binary-to-Octal Conversion

More Related Content

PPTX
Cse 112 number system-[id_142-15-3472]
PPTX
Number system
PPT
numbers_systems (1).ppt
PPTX
numbers_systems.pptx
PPT
numbers_systems.ppt
PPT
numbers_systems.ppt
PPT
numbers_systems.ppt
PPT
numbers_systems.ppt numbers_systems.pptt
Cse 112 number system-[id_142-15-3472]
Number system
numbers_systems (1).ppt
numbers_systems.pptx
numbers_systems.ppt
numbers_systems.ppt
numbers_systems.ppt
numbers_systems.ppt numbers_systems.pptt

Similar to Lecture 02 - Logic Design(Number Systems).pptx (20)

PPT
Conversion between various numbers_systems
PPT
numbers_systems.ppt DIFFERENT NUMBER SYTEMS AND ITS CONVERSIONS
PPTX
chapter2.pptx electrical engineering for student
PPTX
Number system by ammar nawab
PPTX
1. Digital Electronics - Number System PART 1.pptx
PPTX
U1 - Code Conversion.pptx
PPTX
1. Number System in Digital Electronics.pptx
PPTX
Introduction of number system
PDF
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
PDF
1. Digital Electronics Number System.pdf
PPT
IS 139 Lecture 4 - 2015
PPT
IS 139 Lecture 4
PPTX
CHAPTERs_1_NUMBER_SYSTEMS_AND_CODES.pptx
PPTX
Number system
PDF
Data representation in computers
PPTX
Introduction to number system
PPT
Number Systems.ppt
PDF
005618132.pdf
PPT
Chapter 2 Data Representation.pptChapter 2 Data Representation.ppt
PPTX
Data Representation
Conversion between various numbers_systems
numbers_systems.ppt DIFFERENT NUMBER SYTEMS AND ITS CONVERSIONS
chapter2.pptx electrical engineering for student
Number system by ammar nawab
1. Digital Electronics - Number System PART 1.pptx
U1 - Code Conversion.pptx
1. Number System in Digital Electronics.pptx
Introduction of number system
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
1. Digital Electronics Number System.pdf
IS 139 Lecture 4 - 2015
IS 139 Lecture 4
CHAPTERs_1_NUMBER_SYSTEMS_AND_CODES.pptx
Number system
Data representation in computers
Introduction to number system
Number Systems.ppt
005618132.pdf
Chapter 2 Data Representation.pptChapter 2 Data Representation.ppt
Data Representation
Ad

More from shwan it (12)

PPTX
created appliciatons with Ai programming
PPTX
Ai created application by used Ai program
PDF
CH 1 for computer since write for code .pdf
PDF
Lec2- for c++ code Video Display Devices.pdf
PDF
02_Configure_a_Network_Operating_System.pdf
PDF
8--CSS-Classes-and-IDs.pdf for second to college
PDF
11--CSS-Box-Model.pdf for second college
PDF
web design for html to second yea for college
PPTX
Blue Futuristic Illustrative Artificial Intelligence Project Presentation.pptx
PDF
CS Lectures 1maher its sciences computer
PDF
Konsbruck.pdf
PDF
html5-tag-cheat-sheet-2019.pdf
created appliciatons with Ai programming
Ai created application by used Ai program
CH 1 for computer since write for code .pdf
Lec2- for c++ code Video Display Devices.pdf
02_Configure_a_Network_Operating_System.pdf
8--CSS-Classes-and-IDs.pdf for second to college
11--CSS-Box-Model.pdf for second college
web design for html to second yea for college
Blue Futuristic Illustrative Artificial Intelligence Project Presentation.pptx
CS Lectures 1maher its sciences computer
Konsbruck.pdf
html5-tag-cheat-sheet-2019.pdf
Ad

Recently uploaded (20)

PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Nekopoi APK 2025 free lastest update
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PDF
Cost to Outsource Software Development in 2025
PDF
Download FL Studio Crack Latest version 2025 ?
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Autodesk AutoCAD Crack Free Download 2025
PPTX
CHAPTER 2 - PM Management and IT Context
Design an Analysis of Algorithms I-SECS-1021-03
Weekly report ppt - harsh dattuprasad patel.pptx
Odoo Companies in India – Driving Business Transformation.pdf
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Patient Appointment Booking in Odoo with online payment
Operating system designcfffgfgggggggvggggggggg
iTop VPN Crack Latest Version Full Key 2025
Digital Systems & Binary Numbers (comprehensive )
Nekopoi APK 2025 free lastest update
17 Powerful Integrations Your Next-Gen MLM Software Needs
Cost to Outsource Software Development in 2025
Download FL Studio Crack Latest version 2025 ?
Complete Guide to Website Development in Malaysia for SMEs
Wondershare Filmora 15 Crack With Activation Key [2025
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Autodesk AutoCAD Crack Free Download 2025
CHAPTER 2 - PM Management and IT Context

Lecture 02 - Logic Design(Number Systems).pptx

  • 1. 1 Computer Logic Design Lecture 2 Number Systems LECTURERS:DAROON ALI &SAZAN KAMAL BAYAN UNIVERSITY
  • 2. Outlines Base of Number Systems Decimal Numbers Binary Numbers  MSB and LSB  Binary to Decimal Conversion  Decimal To Binary Conversion Hexadecimal Numbers  Conversions Octal Numbers  Conversions
  • 3. Number Systems The numeric system we use daily is the decimal system,  but this system is not convenient for machines  since the information is handled codified in the shape of On or Off bits; A base of a number system defines the range of values that a digit may have. For example,  base 2 Binary number has only Two different values (0 and 1).  base 10 Decimal number has Ten different values (0,1,2,3,4,5,6,7,8 and 9).  And etc.…
  • 4. Decimal Numbers The position of each digit in a weighted number system is assigned a weight based on the base of the system.  The base of decimal numbers is ten, because only ten symbols (0 through 9) are used to represent any number. The column weights of decimal numbers are powers of ten that increase from right to left beginning with 100 =1:  105 104 103 102 101 100 For fractional decimal numbers, the column weights are negative powers of ten that decrease from left to right:  102 101 100. 10-1 10-2 10-3 10-4
  • 5. Decimal Numbers Decimal numbers can be expressed as the sum of the products of each digit times the column value for that digit.  Thus, the number 9240 can be expressed as Example: Express the number 480.52 as the sum of values of each digit. (9 x 103) + (2 x 102) + (4 x 101) + (0 x 100) or 9 x 1,000 + 2 x 100 + 4 x 10 + 0 x 1 480.52 = (4 x 102) + (8 x 101) + (0 x 100) + (5 x 10-1) +(2 x 10-2)
  • 6. Binary Numbers For digital systems, the binary number system is used. Binary has a radix of two and uses the digits 0 and 1 to represent quantities. The column weights of binary numbers are powers of two that increase from right to left beginning with 20 =1:  …25 24 23 22 21 20. For fractional binary numbers, the column weights are negative powers of two that decrease from left to right:  22 21 20. 2-1 2-2 2-3 2-4 …
  • 7. LSB and MSB Binary number can be a stream of 0 and 1  For Example :  10010010  010101  111001  1101100 The first bit from the left is called Most Significant Bit (MSB)  Because of its significance on the number. The first bit from the right is called Least Significant Bit (LSB)  Because of its low significance on the number. 1001101 MSB LSB Second MSB
  • 8. Binary-to-Decimal Conversion The decimal equivalent of a binary number can be determined by adding the column values of all of the bits that are 1 and discarding all of the bits that are 0. Example: Convert the binary number 100101.01 to decimal. Solution:
  • 10. Decimal-to-Binary Conversion  You can convert a decimal whole number to binary by reversing the procedure.  Write the decimal weight of each column and place 1’s in the columns that sum to the decimal number This Method is called Sum - Of - Weights Method.  Example : Convert the decimal number 49 to binary.  Solution :  The column weights double in each position to the right.  Write down column weights until the last number is larger than the one you want to convert.
  • 11. Decimal-to-Binary Conversion Repeated Division-by-2 Method A systematic method of converting whole numbers from decimal to binary is the repeated division-by-2 process.  For example, to convert the decimal number 12 to binary,  begin by dividing 12 by 2.  Then divide each resulting quotient by 2 until there is a 0 whole-number quotient.  The remainders generated by each division form the binary number.  The first remainder to be produced is the LSB (least significant bit) in the binary number,  and the last remainder to be produced is the MSB (most significant bit).  This procedure is shown in the following steps for converting the decimal number 12 to binary.
  • 13. Decimal-to-Binary Conversion Example:  Convert the following decimal numbers to binary:  (a) 19 (b) 45
  • 14. Decimal-to-Binary Conversion Converting Decimal Fractions to Binary Sum-oF-Weights  The sum-of-weights method can be applied to fractional decimal numbers, as shown in the following example:  0.625 = 0.5 + 0.125 = 2-1 + 2-3 = 0.101  There is a 1 in the 2-1 position, a 0 in the 2-2 position, and a 1 in the 2-3 position.
  • 15. Decimal-to-Binary Conversion Repeated Multiplication by 2 As you have seen, decimal whole numbers can be converted to binary by repeated division by 2. Decimal fractions can be converted to binary by repeated multiplication by 2. For example, to convert the decimal fraction 0.3125 to binary,  begin by multiplying 0.3125 by 2  and then multiplying each resulting fractional part of the product by 2 until the fractional product is zero or until the desired number of decimal places is reached.  The carry digits, or carries, generated by the multiplications produce the binary number.  The first carry produced is the MSB, and the last carry is the LSB. This procedure is illustrated as follows:
  • 17. Decimal-to-Binary Conversion Example : Convert the decimal fraction 0.188 to binary by repeatedly multiplying the fractional results by 2. Solution:
  • 18. Hexadecimal Numbers The hexadecimal number system has sixteen characters. They are:  0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F Hexadecimal is a weighted number system. The column weights are powers of 16, which increase from right to left. 4096 256 16 1 163 162 161 160
  • 20. Binary-to-Hexadecimal Conversion Converting a binary number to hexadecimal is a straightforward procedure. Simply break the binary number into 4-bit groups, starting at the right-most bit and replace each 4-bit group with the equivalent hexadecimal symbol.
  • 21. Hexadecimal-to-Binary Conversion To convert from a hexadecimal number to a binary number, reverse the process and replace each hexadecimal symbol with the appropriate four bits.
  • 22. Hexadecimal-to-Decimal Conversion One way to find the decimal equivalent of a hexadecimal number is  first convert the hexadecimal number to binary and then convert from binary to decimal.
  • 23. Hexadecimal-to-Decimal Conversion Another way to convert a hexadecimal number to its decimal equivalent is  multiply the decimal value of each hexadecimal digit by its weight and then take the sum of these products.  The weights of a hexadecimal number are increasing powers of 16 (from right to left).  For a 4-digit hexadecimal number, the weights are 4096 256 16 1 163 162 161 160
  • 24. Hexadecimal-to-Decimal Conversion Example : Express 1A2F16 in decimal. Solution :  Start by writing the column weights:  4096 256 16 1  ( 1 A 2 F)16 = 1(4096) + 10(256) +2(16) +15(1) = 6703
  • 25. Decimal-to-Hexadecimal Conversion Repeated division of a decimal number by 16 will produce the equivalent hexadecimal number, formed by the remainders of the divisions. The first remainder produced is the least significant Digit (LSD). Each successive division by 16 yields a remainder that becomes a digit in the equivalent hexadecimal number.
  • 27. Octal Numbers Like the hexadecimal number system, the octal number system provides a convenient way to express binary numbers and codes. The octal number system is composed of eight digits, which are  0, I, 2, 3, 4, 5, 6, 7
  • 28. Octal-to-Decimal Conversion Since the octal number system has a base of eight, each successive digit position is an increasing power of eight, beginning in the right-most column with 8°. The evaluation of an octal number in terms of its decimal equivalent is accomplished by multiplying each digit by its weight and summing the products,  as illustrated here for (2374),
  • 29. Decimal-to-Octal Conversion A method of converting a decimal number to an octal number is the repeated division-by- 8 method,
  • 30. Octal-to-Binary Conversion Because each octal digit can be represented by a 3-bit binary number, it is very easy to convert from octal to binary. Each octal digit is represented by three bits as shown below. To convert an octal number to a binary number, simply replace each octal digit with the appropriate three bits.
  • 31. Binary-to-Octal Conversion Conversion of a binary number to an octal number is the reverse of the octal-to-binary conversion. The procedure is as follows:  Start with the right-most group of three bits and, moving from right to left,  convert each 3-bit group to the equivalent octal digit.  If there are not three bits available for the left-most group, add either one or two zeroes to make a complete group.  These leading zeroes do not affect the value of the binary number