Chapter 4: Representation of data in computer systems: Number OCR Computing for GCSE © Hodder Education 2011.

Slides:



Advertisements
Similar presentations
DATA REPRESENTATION CONVERSION.
Advertisements

Information Processing Session 5B Binary Arithmetic Slide
Number Systems. 2 The total number of allowable symbols in a number system is called the radix or base of the system. Decimal Numbers: radix = 10 (symbols:
Chapter 4.2 Binary numbers: Arithmetic
Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.
Converting Binary to Octal
 Binary Binary  Binary Number System Binary Number System  Binary to Decimal Binary to Decimal  Decimal to Binary Decimal to Binary  Octal and Hexadecimal.
Binary Numbers.
Numbering Systems Decimal (Denary) base 10. Clumsy when dealing with computers. Other systems –Binary –Octal –Hexadecimal Convenient when dealing with.
© GCSE Computing Candidates should be able to:  convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice versa  add two 8-bit.
Binary and Hexadecimal Numbers
Data Representation in Computer Systems. 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers.
Lecture 2 Bits, Bytes & Number systems
Number Systems Ron Christensen CIS 121.
CMSC 104, Lecture 051 Binary / Hex Binary and Hex The number systems of Computer Science.
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
Conversions Denary to Binary Method 1
THE BINARY SYSTEM.
Octal to Decimal Hexadecimal DecimalOctal Binary.
Data Representation Hexadecimal  Although computers work in binary it is sometimes inconvenient for humans to read everything in Binary. For example in.
AEEE2031 Data Representation and Numbering Systems.
Number Bases and Representation. Denary Number System (Base 10) Our number system uses 10 digits (0-9) As you move from right to left each number is worth.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
GCSE Computing: A451 Computer Systems & Programming Numbers Representation of Data in Computer Systems.
Candidates should be able to:
A)Convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice versa b)Add two 8-bit binary integers and explain overflow errors which.
Number Representation Lecture Topics How are numeric data items actually stored in computer memory? How much space (memory locations) is.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Hexadecimal (base 16) BY MAT D. What is hexadecimal  Hexadecimal is a number system like binary or denary that has 16 characters, the numbers 0-9 and.
Cis303a_chapt03_exam1_answer.ppt CIS303A: System Architecture Exam 1: Chapter 3 Answer List the characters (digits) for the following bases. 1) Decimal:
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.
CMSC 1041 Binary / Hex Binary and Hex The number systems of Computer Science.
Number Systems. ASCII – American Standard Code for Information Interchange – Standard encoding scheme used to represent characters in binary format on.
Two’s Complement The language of machines, part II.
Chapter 32 Binary Number System. Objectives After completing this chapter, you will be able to: –Describe the binary number system –Identify the place.
Chapter 5 NUMBER REPRESENTATION AND ARITHMETIC CIRCUITS.
Conversions 1)Binary to Denary Method 1 Work out the position values of the binary bits and add those values together So above would be
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
WHAT IS BINARY? Binary is a number system that only uses two digits: 1 and 0. Any information that processed by a computer it is put into sequence of.
Programmable Logic Controller
Introduction To Number Systems
Digital Design Chapter One Digital Systems and Binary Numbers
Binary, Denary, Hexadecimal Conversion Binary Addition
Binary and Hexadecimal
Octal to Decimal Decimal Octal Binary Hexadecimal.
Discrete Mathematics Numbering System.
By: Jonathan O. Cabriana
Digital Electronics INTRODUCTION ANALOG VS DIGITAL NUMBER SYSTEMS.
Lesson Objectives Understand the hexadecimal numbering system
COMPUTING FUNDAMENTALS
Convert Decimal to Binary
2.0 COMPUTER SYSTEM 2.2 Number System and Representation
Tools of Web Development 1: Module A: Numbering Systems
Fundamentals & Ethics of Information Systems IS 201
Lesson Objectives Aims You should be able to: Convert Denary to Binary
Decimal System The radix or base of a number system determines
Lesson Objectives To understand how to add 4 and 8 bit binary numbers together To understand what is meant by the term “Overflow” ALL students will add.
Numbering System TODAY AND TOMORROW 11th Edition
Data Hexadecimal.
Topic 3: Data Hexadecimal.
Binary Lesson 3 Hexadecimal
Binary Lesson 3 Hexadecimal
Binary  Name: Class: .
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.
GCSE COMPUTER SCIENCE Topic 3 - Data 3.4 Hexadecimal Conversion.
Hexadecimal.
Data Binary Arithmetic.
GCSE COMPUTER SCIENCE Topic 3 - Data 3.2 Signed Integers.
Presentation transcript:

Chapter 4: Representation of data in computer systems: Number OCR Computing for GCSE © Hodder Education 2011

Denary Numbers can be expressed in many different ways. We usually use decimal or denary. Denary numbers are based on the number 10. We use ten digits: 0,1,2,3,4,5,6,7,8,9. When we put the digits together, each column is worth ten times the one to its right. OCR Computing for GCSE © Hodder Education 2011

Denary So, the denary number 1234 is OCR Computing for GCSE © Hodder Education 2011 Place value Digit1234 Place valueDigitValue × 1000 = × 100 = × 10 = × 1 =4 TotalΣ =1234

Binary to denary It is simpler to make machines that only need to distinguish two states, not ten. That is why computers use binary numbers. OCR Computing for GCSE © Hodder Education Each column is worth twice the column to it right Add up the columns that have a 1 on them. In this case it is In this case it is = 143.

Denary to binary One technique is to take the denary number and repeatedly divide by 2. Write down the result and the remainder. For example, find the denary number 147: Read from the bottom up: 147 in binary is OCR Computing for GCSE © Hodder Education 2011 ResultRemainder 147 ÷ 2 = ÷ 2 = ÷ 2 = ÷ 2 =90 9 ÷ 2 =41 4 ÷ 2 =20 2 ÷ 2 =10 1 ÷ 2 =01

Binary addition The rules for binary addition: = = = 0 carry = 1 carry 1 Add the binary equivalents of denary (we know this equals 9). OCR Computing for GCSE © Hodder Education 2011 DenaryBinary Carry1

Binary addition Sometimes we run into problems. Suppose we have eight bits in each location. Add the binary equivalent of denary We know this equals 295. No room for a carry so it is lost and we get the wrong answer. When there isn’t enough room for a result, this is called overflow and produces an overflow error. OCR Computing for GCSE © Hodder Education 2011 DenaryBinary Carry11

Hexadecimal numbers Programmers often write numbers down in hexadecimal (hex) form. Hexadecimal numbers are based on the number 16. They have 16 different digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F Each column is worth16 times the one on its right. OCR Computing for GCSE © Hodder Education

Hexadecimal numbers We can convert denary numbers to hexadecimal by repeated division just as we did to get binary numbers. Take the denary number 141. We have the hexadecimal values 8 and 13 as remainders. 13 in hexadecimal is D. So, reading from the bottom again (where necessary), 141 in hexadecimal is 8D. OCR Computing for GCSE © Hodder Education 2011 ResultRemainder 141 ÷ 16 =813

Hexadecimal to denary All we do is multiply the numbers by their place values and add them together. For example, take the hexadecimal number 4F = 79 So, 4F is 79 in denary. OCR Computing for GCSE © Hodder Education 2011 Place value Hex digits04F Denary= 0 × 256= 4 × 16= 15 × 1 = 0= 64= 15

Binary to hexadecimal This is particularly easy. Simply take each group of four binary digits, starting from the right and translate into the equivalent hex number. OCR Computing for GCSE © Hodder Education 2011 Binary HexF3

Hexadecimal to binary Do the reverse. You may find it easier to go via denary. Treat each hex digit separately. OCR Computing for GCSE © Hodder Education 2011 HexDB Denary1211 Binary

Why use hexadecimal? Each hex digit represents four binary digits exactly. This makes it a useful shorthand way for programmers to write numbers. This saves effort and reduces the chance of making mistakes. OCR Computing for GCSE © Hodder Education 2011