Everything that goes on under the hood of a computer is done in binary -- the language of 0s and 1s. If we have only two numbers, it's very easy to represent.

Slides:



Advertisements
Similar presentations
CS 240: Data Structures Binary Representations. Binary Binary is a numerical system that is used to represent numeric values. Binary is a numerical system.
Advertisements

Kavita Hatwal Fall The decimal system, also called the base 10 number system is based on ten numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. All the numbers.
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,
James Tam Non decimal math: doing math with non-base 10 number systems Addition, subtraction and multiplication with binary, octal and hexadecimal.
Mathematics with Binary. Question  Below is a binary string  Which is the least significant bit (LSB)?  Which is the most significant bit (MSB)? 0.
What do we use to measure weights nowadays? Grams. 1 gram is about the weight of one Skittle sweet. Instead of writing grams we often just write g. Kilograms.
Teaching Computing at KS3 Session 2 Sue Sentance and Sophie Baker
Binary Numbers Converting Decimal to Binary Binary to Decimal.
Floating Point Numbers.  Floating point numbers are real numbers.  In Java, this just means any numbers that aren’t integers (whole numbers)  For example…
Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.
Multiplying Decimals. Multiplying Decimals Notes Multiply as usual, ignoring the decimal points. Count how many total digits are to the right of the decimal.
In a not gate, if the input is on(1) the output is off (0) and vice versa.
Decimal Review ,00010,0001, Decimal ~ Base 10 number system 10 different numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8,
Scientific Notation Recognize and use scientific notation.
Representation of data types. Introduction We are going to look at representing cardinal numbers, integers and real numbers in decimal, binary, octal.
Multiplying Decimals Lesson 1-7 From /
Binary! Why do computers use binary? Easy to detect the state of a switch – they’re either on or off! Using another base makes.
Chapter 2: The Logic of Compound Statements 2.5 Application: Number Systems and Circuits for Addition 1 Counting in binary is just like counting in decimal.
Data Basics. Binary Number System Numeration systems are methods of representing numbers. All current number systems are positional in nature. In
CMSC 104, Lecture 051 Binary / Hex Binary and Hex The number systems of Computer Science.
What are these?. Binary Clock ICE3M May 7, 2007 Ms. Nelson.
Visualizing Decimal and Binary
THE BINARY NUMBER SYSTEM “There are only 10 types of people in this world: Those who understand BINARY and those who do not.”
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale.
ECE 362 Microprocessor Systems and Interfacing ©5-1 Lecture 1 Hexadecimal Computation Outline n Decimal n Binary n Octal n Hexadecimal.
Binary Numbers Computer Science 2. Why Binary Numbers? Early computers were analog –Numbers were stored as an intensity –E.g. 2.7 volts was 27, 3.4 volts.
Binary Decimal Hexadecimal
Numerical formats What’s the main idea? Want to represent numbers (eg: 45, -12, ) using only bits. We’ve already seen (or you can read in the book)
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.
Scientific Notation. What is Scientific Notation? Scientific notation is a way of writing extremely large or small measurements. The number is written.
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.
YOUR VIRTUAL WORLD – THE HEXADECIMAL NUMBERING SYSTEM Prepared by Mrs. Christina Morris, July, 2014.
Floating Point Numbers
Dr.Faisal Alzyoud 2/20/2018 Binary Arithmetic.
Binary and Logic Computers use electrical signals that are on or off, so they have to see everything as a series of binary numbers. This data is represented.
Scientific Notation.
Binary Positional Notation
CHAPTER 1 : INTRODUCTION
Representation of data in computer systems
Multiplying Decimals Lesson 1-7. To Multiply: You do not line up the factors by the decimal. Instead, place the number with more digits on top. Line up.
Lesson objectives Understand how computers represent and manipulate numbers [unsigned integers, signed integers (sign and magnitude, Two’s complement)
Number Systems.
COUNTING IN BINARY Binary weightings 0 x x x x 8
Visualizing Decimal and Binary
Mr Barton’s Maths Notes
Representing Data How does a computer represent data?
Notes: Scientific Notation
Number Systems Base 2, 10, 16.
Teaching KS3 Computing Session 2 Introduction Theory: Binary numbers
In this lesson you will learn how to read and write algebraic expressions by using variables.
Conditions and Boolean Expressions
Multiplying Decimals Lesson 13.2.
Multiplying Decimals Lesson 1-7.
Data Binary Conversion.
Plan Attendance Files Posted on Campus Cruiser Homework Reminder
How Computers Store Data
Objective - To add and subtract decimals.
How to Represent Numbers on a Computer
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
Multiplying Decimals.
Using Significant Digits
Converting from Base-n to Base-10
Multiplying Decimals Lesson 1-7.
Addition & Subtraction Addition & Subtraction
We’ve reached second semester! Welcome back!
GCSE COMPUTER SCIENCE Topic 3 - Data 3.3 Logical and Arithmetic Shifts.
Lecture 35 – Unit 6 – Under the Hood Binary Encoding – Part 1
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
1 1. Binary Basics Year 8 Unit 1 Bitmap Graphics.
Presentation transcript:

Everything that goes on under the hood of a computer is done in binary -- the language of 0s and 1s. If we have only two numbers, it's very easy to represent them in the physical world using electricity. You can think of each binary digit as a switch or a light bulb that can be either on or off, where by convention 0 is thought of as "off" and 1 is "on".

We are used to decimal notation: 1 6 3 102 101 100 1*102 + 6*101 + 3*100 = 163 Let's think more carefully about decimal notation. To represent the number 163, we've got a 3 in the 1s place (100), a 6 in the 10s place (101), and a 1 in the 100s place (102). You get 163 when you multiply these digits by their respective powers of 10 and sum them.

Computers store and process data via binary notation: 1 0 1 0 0 0 1 1 27 26 25 24 23 22 21 20 1*27 + 0*26 + 1*25 + 0*24 + 0*23 + 0*22 + 1*21 + 1*20 = 163 To represent this same number in binary, you'll need a 1 in the 1s place (20), a 1 in the 2s place (21), a 1 in the 32s place (25), and a 1 in the 128s place (27). You get 163 when you multiply these digits by their respective powers of 2 and sum them.

Converting Binary to Decimal (and vice versa) 1 = 1*20 = 1 10 = 1*21 + 0*20 = 2 11 = 1*21 + 1*20 = 3 100 = 1*22 + 0*21 + 0*20 = 4 101 = 1*22 + 0*21 + 1*20 = 5 Let's count to 5 in binary! Note how we can multiply the binary digits by their respective powers of two and sum them to convert to a decimal value.

Addition and Subtraction (Don’t forget to carry your 1s) 1 1 10 010 0 - 0 0 0 1 0 1 1 0 1 0 1 0 1 01 11 1 + 0 1 0 0 0 1 1 1 1 1 0 0 Addition and subtraction in binary works the same way as in decimal. Start on the right, and carry the 1s as needed.