Binary Arithmetic CPSC 101: Chp 2 John Lamertina.

Slides:



Advertisements
Similar presentations
CIS 020 Assembly Programming Chapter 02 - Numbering Systems & Data Representation © John Urrutia 2012, All Rights Reserved.5/27/20121.
Advertisements

Digital Circuit Why Digital Circuit? – Digital signals ( 0 and 1) are very easy to handle with electronic circuits only 2 states needed: Switch ON or OFF,
Binary Numbers Converting Decimal to Binary Binary to Decimal.
Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.
Chapter 1 1 Number Systems. 2 Objectives  Understand why computers use binary (Base-2) numbering.  Understand how to convert Base-2 numbers to Base-
Put two and two together to get 100 And still be right!!!
+ CS 325: CS Hardware and Software Organization and Architecture Integers and Arithmetic.
Numbering Systems Decimal (Denary) base 10. Clumsy when dealing with computers. Other systems –Binary –Octal –Hexadecimal Convenient when dealing with.
Revision Introductory Lesson
The Binary Number System Emily Beck and Susan Cantrell.
HUNDREDTHS One of one hundred equal parts Example:
1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers.
1 Problem Solving using computers Data.. Representation & storage Representation of Numeric data The Binary System.
Number Systems. Today Decimal Hexadecimal Binary –Unsigned Binary –1’s Complement Binary –2’s Complement Binary.
INTRODUCTION TO COMPUTING LECTURE#04. TRANSFORMING DATA INTO INFORMATION Understands only two states either On or Off  Makes different patterns of 0s.
Binary! Why do computers use binary? Easy to detect the state of a switch – they’re either on or off! Using another base makes.
– Digital Circuit 1 Choopan Rattanapoka
Place Value.
Number systems, Operations, and Codes
NUMBER SYSTEM Decimal System Binary System. We use two digits in this system (0,1) just like the existing system of computers.. And write the number in.
Divisibility Rules and Finding Factors
Digital Electronics Octal & Hexadecimal Number Systems.
CSC 107 – Programming For Science. Positional Notation  Used in nearly all modern numerical systems  Right-to-left ordering of digits within larger.
Visualizing Decimal and Binary
PHY 107 – Programming For Science. Positional Notation  Used in nearly all modern numerical systems  Right-to-left ordering of digits within larger.
Dividing Decimals Module 5 Lesson 4 GET READY TO WRITE NOTES.
Divisibility Rules: What are they? Rules to help you determine if numbers are divisible by other numbers. Divisible – if a number can be divided by another.
Octal & Hexadecimal Number Systems
$100 $200 $300 $400 $100 $200 $300 $400 $300 $200 $100 Multiply by 1 digit numbers Multiply & estimate results Multiply by 2 digit numbers Multiply.
Section 5 Digital Electronic Circuits. Chapter 32 Binary Number System.
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
Number Systems and Binary Arithmetic Quantitative Analysis II Professor Bob Orr.
Number Systems & Binary How to count. How do we represent numbers? Early systems: – Actual count : ||||| = 5 – Roman numers : XI = 11 Hard to do math:
Number systems Visualizing Decimal and Binary. We count in base 10 because people started by counting on their fingers Base 10 is a number system that.
Binary Numbers. Decimal vs Binary = 1001 = 101 = 10 1 = on = 0 = off = On and off.
Decimal Numbers.
Chapter 1: Arithmetic & Prealgebra
Different Numeral Systems
Consider this number: , Ones (7 ones) Tens (no tens)
Scientific Notation.
4,135,652 Place Value Hundred Thousands Ten Thousands Hundreds
Convert Decimal to Binary
Number Systems & Binary
Binary Lesson 1 Nybbles.
Number Systems.
COUNTING IN BINARY Binary weightings 0 x x x x 8
Visualizing Decimal and Binary
Number Systems and Binary Arithmetic
Notes: Scientific Notation
Place Value.
Comparing Numbers.
Binary Lesson 1 Nybbles.
Binary Lesson 1 Nybbles.
4,135,652 Place Value Hundred Thousands Ten Thousands Hundreds
Multiplying & Dividing by Powers of Ten
Expanded Form = 3, (3 x 1,000) + (5 x 100)
Problems, understanding and solutions
Binary Numbers? Foley SED 514 Section /2/2019.
Counting
Starter Using the fingers on only one hand, what is the highest number you can count to? Rules: You must start at 1 You must count sequentially (i.e.
Counting
Place Value.
The basics of any electronic device means either electricity is flowing or it is not i.e. a switch is either on or off Computers are electronic devices.
COUNTING IN BINARY Binary weightings 0 x x x x 8
Scientific Notation.
Dividing a whole number to get decimal
Tenths and Hundredths.
Comparing Numbers.
Number Systems Today, I’ll be giving an introduction to:
Counter Fundamentals Presented by :
Presentation transcript:

Binary Arithmetic CPSC 101: Chp 2 John Lamertina

Early Need to Count

One-to-One Sets 27 pebbles ≡ 27 sheep |||||||||||||||||||||||||||||

Counting in 10s Up to TEN More than TEN?

Countable Sets of

Why Decimal Numbers? 10 fingers 10 digits (0,1,2,3,…,9) Countable Sets of 10 Ones Ones Tens Tens Hundreds Hundreds Thousands Thousands etc etc

Simple Decimal Number 27 = = 2 tens + 7 ones = (2×10) + (7×1) = (2×10 1 ) + (7×10 0 ) Powers of 10 Anything to the zero power is 1

9327 = = 9 thousands + 3 hundreds + 2 tens + 7 ones = (9×1000) + (3×100) + (2×10) + (7×1) = (9×10 3 ) + (3×10 2 ) + (2×10 1 ) + (7×10 0 ) Another Decimal Number Powers of 10

7009 = = 7 thousands + 0 hundreds + 0 tens + 9 ones = (7×1000) + (0×100) + (0×10) + (9×1) = (7×10 3 ) + (0×10 2 ) + (0×10 1 ) + (9×10 0 ) A Decimal Number with Zeros Powers of 10

Decimal vs Binary Decimal numbers are powers of 10 Deci = 10 Binary numbers are powers of 2 Bi = 2

Why Binary Numbers? Electronic circuits have two possible states or values: Off and On Off and On: Zero and One (0, 1) Two digits (0, 1): binary number system Thus computers operate on the binary number system

Simple Binary Number = = (1×2 2 ) + (0×2 1 ) + (1×2 0 ) Powers of 2 Read “101, base 2” not 101 squared.

Simple Binary Number = = (1×2 2 ) + (0×2 1 ) + (1×2 0 ) = = = 5 10

Simple Decimal Number vs Simple Binary Number 15 = = 1 ten + 5 ones = (1×10) + (5×1) = (1×10 1 ) + (5×10 0 ) = = (1×2 3 ) + (1×2 2 ) + (1×2 1 ) + (1×2 0 ) = = Powers of 10 Powers of 2

Convert Binary to Decimal (1×2 7 ) + (0×2 6 ) + (1×2 5 ) + (1×2 4 ) + (0×2 3 ) + (1×2 2 ) + (0×2 1 ) + (1×2 0 ) = = Digit Exponent Power of Decimal

Convert Decimal to Binary: “Successive Division by Two” Divide by 2 RemainderExplanation 29 29: starting decimal number 14 29/2 = 14, remainder of /2 = 7, remainder of 0 3 7/2= 3, remainder of 1 3/2 = 1, remainder of 1 Binary Result : Example Decimal Number: 29