SlideShare a Scribd company logo
Chapter 1 1
Number Systems
2
Objectives
Understand why computers use binary (Base-2)
numbering.
Understand how to convert Base-2 numbers to Base-
10 or Base-8.
Understand how to convert Base-8 numbers to Base-
10 or Base 2.
Understand how to convert Base-16 numbers to Base-
10, Base 2 or Base-8.
3
Why Binary System?
• Computers are made of a series of
switches
• Each switch has two states: ON or OFF
• Each state can be represented by a number
– 1 for “ON” and 0 for “OFF”
4
Converting Base-2 to Base-10
(1 0 1 1)
2
0
ON
OFF
ON
OFF
ON
Exponent:
Calculation: 0 0 2 1
16+ + + + =
(19)10
5
• Number systems include decimal, binary,
octal and hexadecimal
• Each system have four number base
Number System Base Symbol
Binary Base 2 B
Octal Base 8 O
Decimal Base 10 D
Hexadecimal Base 16 H
6
1.1 Decimal Number System
• The Decimal Number System uses base 10. It
includes the digits {0, 1,2,…, 9}. The weighted
values for each position are:
10^4 10^3 10^2 10^1 10^0 10^-1 10^-2 10^-3
10000 1000 100 10 1 0.1 0.01 0.001
Base
Right of decimal point
left of the decimal point
7
• Each digit appearing to the left of the decimal
point represents a value between zero and nine
times power of ten represented by its position in
the number.
• Digits appearing to the right of the decimal point
represent a value between zero and nine times an
increasing negative power of ten.
• Example: the value 725.194 is represented in
expansion form as follows:
• 7 * 10^2 + 2 * 10^1 + 5 * 10^0 + 1 * 10^-1 + 9 *
10^-2 + 4 * 10^-3
• =7 * 100 + 2 * 10 + 5 * 1 + 1 * 0.1 + 9 * 0.01 + 4 *
0.001
• =700 + 20 + 5 + 0.1 + 0.09 + 0.004
• =725.194
8
1.2 The Binary Number Base
Systems
• Most modern computer system using binary logic. The
computer represents values(0,1) using two voltage levels
(usually 0V for logic 0 and either +3.3 V or +5V for logic
1).
• The Binary Number System uses base 2 includes only the
digits 0 and 1
• The weighted values for each position are :
2^5 2^4 2^3 2^2 2^1 2^0 2^-1 2^-2
32 16 8 4 2 1 0.5 0.25
Base
9
1.3 Number Base Conversion
• Binary to Decimal: multiply each digit by its
weighted position, and add each of the weighted
values together or use expansion formdirectly.
• Example the binary value 1100 1010 represents :
• 1*2^7 + 1*2^6 + 0*2^5 + 0*2^4 + 1*2^3 + 0*2^2 +
1*2^1 + 0*2^0 =
• 1 * 128 + 1 * 64 + 0 * 32 + 0 * 16 + 1 * 8 + 0 * 4 + 1 *
2 + 0 * 1 =
• 128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 =202
10
• Decimal to Binary
There are two methods, that may be used to convert
from integer number in decimal form to binaryform:
1-Repeated Division By 2
• For this method, divide the decimal number by 2,
• If the remainder is 0, on the right side write down a 0.
• If the remainder is 1, write down a 1.
• When performing the division, the remainders which
will represent the binary equivalent of the decimal
number are written beginning at the least significant
digit (right) and each new digit is written to more
significant digit (the left) of the previous digit.
11
• Example: convert the number 333 to binary.
Division Quotient Remainder Binary
333/2 166 1 1
166/2 83 0 01
83/2 41 1 101
41/2 20 1 1101
20/2 10 0 01101
10/2 5 0 001101
5/2 2 1 1001101
2/2 1 0 01001101
1/2 0 1 101001101
12
Octal System
 Computer scientists are often looking for
shortcuts to do things
 One of the ways in which we can represent
binary numbers is to use their octal
equivalents instead
 This is especially helpful when we have to do
fairly complicated tasks using numbers
13
• The octal numbering system includes
eight base digits (0-7)
• After 7, the next placeholder to the right
begins with a “1”
• 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13 ...
14
Octal Placeholders
“Ones
”
“Eights”
“Sixty-
Fours”
64*2 8*4 1*1
82*2 81*4 80*1
2 4 1
Number:
Placeholder
Name:
Value:
Exponential
Expression:
15
Transform (44978)10 to Octal
• .
Division Quotient Remainder Binary
44978 / 8 5622 2 2
5622 / 8 702 6 62
702/8 87 6 662
87/8 10 7 7662
10/8 1 2 27662
1/8 0 1 127662

More Related Content

Similar to lect1.ppt

Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
Lovely Professional University
 
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
GobinathAECEJRF1101
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
sohag sikder
 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effects
PeriyanayagiS
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
ColleenVender2
 
Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:
Asif Iqbal
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
 
Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptx
HamnaKhalid25
 
Lecture 2 ns
Lecture 2 nsLecture 2 ns
Lecture 2 ns
Rabiul Sarker
 
data representation
 data representation data representation
data representation
Haroon_007
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdf
MdJubayerFaisalEmon
 
Binary computing
Binary computingBinary computing
Binary computing
samina khan
 
Standard 9th Number System Power point presentation
Standard 9th Number System Power point presentationStandard 9th Number System Power point presentation
Standard 9th Number System Power point presentation
hemangipednekar0812
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
Meenakshi Paul
 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
4NM21IS132SAISHARATH
 
DLD-Introduction.pptx
DLD-Introduction.pptxDLD-Introduction.pptx
DLD-Introduction.pptx
UzairAhmadWalana
 
Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notes
Kurenai Ryu
 
Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversion
Ram Pratap Singh
 

Similar to lect1.ppt (20)

Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
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
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effects
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:Unit-1 Digital Design and Binary Numbers:
Unit-1 Digital Design and Binary Numbers:
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptx
 
Lecture 2 ns
Lecture 2 nsLecture 2 ns
Lecture 2 ns
 
data representation
 data representation data representation
data representation
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdf
 
Binary computing
Binary computingBinary computing
Binary computing
 
Standard 9th Number System Power point presentation
Standard 9th Number System Power point presentationStandard 9th Number System Power point presentation
Standard 9th Number System Power point presentation
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
Digital Electronics Notes.pdf
Digital Electronics Notes.pdfDigital Electronics Notes.pdf
Digital Electronics Notes.pdf
 
DLD-Introduction.pptx
DLD-Introduction.pptxDLD-Introduction.pptx
DLD-Introduction.pptx
 
1. basic theories of information
1. basic theories of information1. basic theories of information
1. basic theories of information
 
Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notes
 
Number system and their conversion
Number system and their conversionNumber system and their conversion
Number system and their conversion
 

More from MarlonMagtibay2

informationmanagement-130518152950-phpapp01.pptx
informationmanagement-130518152950-phpapp01.pptxinformationmanagement-130518152950-phpapp01.pptx
informationmanagement-130518152950-phpapp01.pptx
MarlonMagtibay2
 
chapter8-stack-161018120225.pdf
chapter8-stack-161018120225.pdfchapter8-stack-161018120225.pdf
chapter8-stack-161018120225.pdf
MarlonMagtibay2
 
arrays-130116232821-phpapp02.pdf
arrays-130116232821-phpapp02.pdfarrays-130116232821-phpapp02.pdf
arrays-130116232821-phpapp02.pdf
MarlonMagtibay2
 
CS4961-L1.ppt
CS4961-L1.pptCS4961-L1.ppt
CS4961-L1.ppt
MarlonMagtibay2
 
CS4961-L9.ppt
CS4961-L9.pptCS4961-L9.ppt
CS4961-L9.ppt
MarlonMagtibay2
 
Data Structure - Stack.pptx
Data Structure - Stack.pptxData Structure - Stack.pptx
Data Structure - Stack.pptx
MarlonMagtibay2
 
Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.ppt
MarlonMagtibay2
 
lecture3_dec_bin_1.ppt
lecture3_dec_bin_1.pptlecture3_dec_bin_1.ppt
lecture3_dec_bin_1.ppt
MarlonMagtibay2
 
Lec2_NumberSystems.ppt
Lec2_NumberSystems.pptLec2_NumberSystems.ppt
Lec2_NumberSystems.ppt
MarlonMagtibay2
 
Arithmetic.ppt
Arithmetic.pptArithmetic.ppt
Arithmetic.ppt
MarlonMagtibay2
 
binary-numbers.ppt
binary-numbers.pptbinary-numbers.ppt
binary-numbers.ppt
MarlonMagtibay2
 
01.NumberSystems.ppt
01.NumberSystems.ppt01.NumberSystems.ppt
01.NumberSystems.ppt
MarlonMagtibay2
 
renewablle energy.ppt
renewablle energy.pptrenewablle energy.ppt
renewablle energy.ppt
MarlonMagtibay2
 
ch04.ppt
ch04.pptch04.ppt
ch04.ppt
MarlonMagtibay2
 
lecture01_Introduction.pdf
lecture01_Introduction.pdflecture01_Introduction.pdf
lecture01_Introduction.pdf
MarlonMagtibay2
 

More from MarlonMagtibay2 (15)

informationmanagement-130518152950-phpapp01.pptx
informationmanagement-130518152950-phpapp01.pptxinformationmanagement-130518152950-phpapp01.pptx
informationmanagement-130518152950-phpapp01.pptx
 
chapter8-stack-161018120225.pdf
chapter8-stack-161018120225.pdfchapter8-stack-161018120225.pdf
chapter8-stack-161018120225.pdf
 
arrays-130116232821-phpapp02.pdf
arrays-130116232821-phpapp02.pdfarrays-130116232821-phpapp02.pdf
arrays-130116232821-phpapp02.pdf
 
CS4961-L1.ppt
CS4961-L1.pptCS4961-L1.ppt
CS4961-L1.ppt
 
CS4961-L9.ppt
CS4961-L9.pptCS4961-L9.ppt
CS4961-L9.ppt
 
Data Structure - Stack.pptx
Data Structure - Stack.pptxData Structure - Stack.pptx
Data Structure - Stack.pptx
 
Lecture_Computer_Codes.ppt
Lecture_Computer_Codes.pptLecture_Computer_Codes.ppt
Lecture_Computer_Codes.ppt
 
lecture3_dec_bin_1.ppt
lecture3_dec_bin_1.pptlecture3_dec_bin_1.ppt
lecture3_dec_bin_1.ppt
 
Lec2_NumberSystems.ppt
Lec2_NumberSystems.pptLec2_NumberSystems.ppt
Lec2_NumberSystems.ppt
 
Arithmetic.ppt
Arithmetic.pptArithmetic.ppt
Arithmetic.ppt
 
binary-numbers.ppt
binary-numbers.pptbinary-numbers.ppt
binary-numbers.ppt
 
01.NumberSystems.ppt
01.NumberSystems.ppt01.NumberSystems.ppt
01.NumberSystems.ppt
 
renewablle energy.ppt
renewablle energy.pptrenewablle energy.ppt
renewablle energy.ppt
 
ch04.ppt
ch04.pptch04.ppt
ch04.ppt
 
lecture01_Introduction.pdf
lecture01_Introduction.pdflecture01_Introduction.pdf
lecture01_Introduction.pdf
 

Recently uploaded

How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 

Recently uploaded (20)

How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 

lect1.ppt

  • 2. 2 Objectives Understand why computers use binary (Base-2) numbering. Understand how to convert Base-2 numbers to Base- 10 or Base-8. Understand how to convert Base-8 numbers to Base- 10 or Base 2. Understand how to convert Base-16 numbers to Base- 10, Base 2 or Base-8.
  • 3. 3 Why Binary System? • Computers are made of a series of switches • Each switch has two states: ON or OFF • Each state can be represented by a number – 1 for “ON” and 0 for “OFF”
  • 4. 4 Converting Base-2 to Base-10 (1 0 1 1) 2 0 ON OFF ON OFF ON Exponent: Calculation: 0 0 2 1 16+ + + + = (19)10
  • 5. 5 • Number systems include decimal, binary, octal and hexadecimal • Each system have four number base Number System Base Symbol Binary Base 2 B Octal Base 8 O Decimal Base 10 D Hexadecimal Base 16 H
  • 6. 6 1.1 Decimal Number System • The Decimal Number System uses base 10. It includes the digits {0, 1,2,…, 9}. The weighted values for each position are: 10^4 10^3 10^2 10^1 10^0 10^-1 10^-2 10^-3 10000 1000 100 10 1 0.1 0.01 0.001 Base Right of decimal point left of the decimal point
  • 7. 7 • Each digit appearing to the left of the decimal point represents a value between zero and nine times power of ten represented by its position in the number. • Digits appearing to the right of the decimal point represent a value between zero and nine times an increasing negative power of ten. • Example: the value 725.194 is represented in expansion form as follows: • 7 * 10^2 + 2 * 10^1 + 5 * 10^0 + 1 * 10^-1 + 9 * 10^-2 + 4 * 10^-3 • =7 * 100 + 2 * 10 + 5 * 1 + 1 * 0.1 + 9 * 0.01 + 4 * 0.001 • =700 + 20 + 5 + 0.1 + 0.09 + 0.004 • =725.194
  • 8. 8 1.2 The Binary Number Base Systems • Most modern computer system using binary logic. The computer represents values(0,1) using two voltage levels (usually 0V for logic 0 and either +3.3 V or +5V for logic 1). • The Binary Number System uses base 2 includes only the digits 0 and 1 • The weighted values for each position are : 2^5 2^4 2^3 2^2 2^1 2^0 2^-1 2^-2 32 16 8 4 2 1 0.5 0.25 Base
  • 9. 9 1.3 Number Base Conversion • Binary to Decimal: multiply each digit by its weighted position, and add each of the weighted values together or use expansion formdirectly. • Example the binary value 1100 1010 represents : • 1*2^7 + 1*2^6 + 0*2^5 + 0*2^4 + 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0 = • 1 * 128 + 1 * 64 + 0 * 32 + 0 * 16 + 1 * 8 + 0 * 4 + 1 * 2 + 0 * 1 = • 128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 =202
  • 10. 10 • Decimal to Binary There are two methods, that may be used to convert from integer number in decimal form to binaryform: 1-Repeated Division By 2 • For this method, divide the decimal number by 2, • If the remainder is 0, on the right side write down a 0. • If the remainder is 1, write down a 1. • When performing the division, the remainders which will represent the binary equivalent of the decimal number are written beginning at the least significant digit (right) and each new digit is written to more significant digit (the left) of the previous digit.
  • 11. 11 • Example: convert the number 333 to binary. Division Quotient Remainder Binary 333/2 166 1 1 166/2 83 0 01 83/2 41 1 101 41/2 20 1 1101 20/2 10 0 01101 10/2 5 0 001101 5/2 2 1 1001101 2/2 1 0 01001101 1/2 0 1 101001101
  • 12. 12 Octal System  Computer scientists are often looking for shortcuts to do things  One of the ways in which we can represent binary numbers is to use their octal equivalents instead  This is especially helpful when we have to do fairly complicated tasks using numbers
  • 13. 13 • The octal numbering system includes eight base digits (0-7) • After 7, the next placeholder to the right begins with a “1” • 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13 ...
  • 14. 14 Octal Placeholders “Ones ” “Eights” “Sixty- Fours” 64*2 8*4 1*1 82*2 81*4 80*1 2 4 1 Number: Placeholder Name: Value: Exponential Expression:
  • 15. 15 Transform (44978)10 to Octal • . Division Quotient Remainder Binary 44978 / 8 5622 2 2 5622 / 8 702 6 62 702/8 87 6 662 87/8 10 7 7662 10/8 1 2 27662 1/8 0 1 127662