Topic 3: Data Hexadecimal.

Slides:



Advertisements
Similar presentations
Base 10 Denary Decimal
Advertisements

Candidates should be able to:
1 3 Computing System Fundamentals 3.5 Data Representation.
A-Level Computing#BristolMet Session Objectives#8 express numbers in binary, octal and hexadecimal explain the use of code to represent a character set.
Hexadecimal In today’s lesson we will look at: the need for something other than binary how hexadecimal works how to convert between hexadecimal and binary.
Chapter 4.2 Binary numbers: Arithmetic
Binary numbers. 1 Humans count using decimal numbers (base 10) We use 10 units: 0, 1, 2, 3, 4, 5, 6, 7, 8 and (5.
 Binary Binary  Binary Number System Binary Number System  Binary to Decimal Binary to Decimal  Decimal to Binary Decimal to Binary  Octal and Hexadecimal.
© 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.
Chapter 16 Binary and Hexadecimal Numbers. §16.2 thru 16.3 – Addition and Subtraction of Binary Numbers Binary = Base 2 Addition and subtraction are similar.
A-Level Computing Data representation. Objectives Know how data can be represented in a computer system Understand the need for various forms of representation.
DECIMAL BASE Based on power of 10 In the number 2,468 – from right to left -- the 8 represents the ones, the 6 represents the tens, the 4 represents the.
Computer Math. The Decimal System How do we represent “One Hundred and Twenty Five”? How do we represent “One Hundred and Twenty Five”? Simple: 125 !!!
1 Pertemuan 2 Network Math. Discussion Topics Binary presentation of data Bits and bytes Base 10 number system Base 2 number system Converting decimal.
Chapter 4: Representation of data in computer systems: Number OCR Computing for GCSE © Hodder Education 2011.
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.
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
Conversions Denary to Binary Method 1
Hexadecimal Data Representation. Objectives  Know how the Hexadecimal counting system works  Be able to convert between denary, binary & hexadecimal.
Data Representation Hexadecimal  Although computers work in binary it is sometimes inconvenient for humans to read everything in Binary. For example in.
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.
THE BINARY NUMBER SYSTEM “There are only 10 types of people in this world: Those who understand BINARY and those who do not.”
1 1 7-Dec-15 Binary Converting to and from decimal.
Candidates should be able to:
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
BINARY Toby Wilson. LEARNING OBJECTIVES  Be able to convert binary to denary  Be able to convert denary into binary  Be able to explain how computers.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Computer Studies Today Chapter 19 1 Chapter 19. Computer Studies Today Chapter 19 2 »Information stored in a computer is in two states: –ON –OFF.
The Hexadecimal Number System Representation of Data in Computer Systems.
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.
Two’s Complement The language of machines, part II.
STARTER – CRACK THE CODE
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
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
First Foray into Programming (the hard way). A reminder from last lesson: A machine code instruction has two parts:  Op-code  Operand An instruction.
Computer Maintenance Numbering Systems Copyright © Texas Education Agency, All rights reserved.1.
WHY HEXADECIMAL?. Why bother with Hexadecimal? 1. Binary numbers are difficult for us to work with. 2. Hexadecimal can be used as “shorthand” for binary.
© 2016 AQA. Created by Teachit for AQA Converting between number bases Lesson.
Number Systems Decimal Can you write 12,045 in expanded form? Base? Allowable digits for each place?
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.
Binary & Decimal numbers
Lecturer: Santokh Singh
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Computer Maintenance Numbering Systems Trade & Industrial Education
Binary, Denary, Hexadecimal Conversion Binary Addition
Binary and Hexadecimal
Different Numeral Systems
Computer Organisation
Unit 18: Computational Thinking
Binary numbers: Week 7 Lesson 1
Lesson Objectives Understand the hexadecimal numbering system
Lesson objectives Understand how computers represent and manipulate numbers [unsigned integers, signed integers (sign and magnitude, Two’s complement)
Lesson Objectives Aims You should be able to: Convert Denary to Binary
Topic 3: Data Binary Arithmetic.
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Topic 3: Data Signed Binary.
Hexadecimal Conversions
Fundamentals of Data Representation
(return of the…) Data blast
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.
Binary It’s all 0’s and 1’s.
GCSE COMPUTER SCIENCE Topic 3 - Data 3.2 Signed Integers.
Understanding Percent
Theory: 2.6 – Data Representation
Section 6 Primitive Data Types
Presentation transcript:

Topic 3: Data Hexadecimal

Hexadecimal We’ve looked at two number systems Denary (a.k.a. decimal): Base 10 Binary: Base 2 There are all kinds of number systems out there, but there’s one more useful one Called hexadecimal Data: Hexadecimal

Hexadecimal Hexadecimal is a base 16 number system First, let’s look at the values for a possible digit: 0-9 then A-F There’s a reason why we look at hexadecimal To do with its relation to binary Hexadecimal 1 2 3 4 5 6 7 8 9 A B C D E F Denary 10 11 12 13 14 15 Data: Hexadecimal

Hexadecimal Let’s look at the same values But this time we’ll include the binary values Notice how the denary value 15 fits into 4 binary bits, but 1 hexadecimal digit? Hexadecimal 1 2 3 4 5 6 7 8 9 A B C D E F Denary 10 11 12 13 14 15 Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Data: Hexadecimal

Hexadecimal This nice ‘coincidence’ makes representing binary easy 1 2 3 4 5 6 7 8 9 A B C D E F Denary 10 11 12 13 14 15 Binary 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 This nice ‘coincidence’ makes representing binary easy Instead of using 4 binary digits, we can use 1 hexadecimal digit It’s worth noting that this easier representation is purely for us Computers will still use binary Data: Hexadecimal

Converting to Hexadecimal As we have another number system, we’ll need to know how to convert From denary to hexadecimal From binary to hexadecimal From hexadecimal to denary From hexadecimal to binary Luckily, the best way to convert between hexadecimal and denary is to go through binary So we only need to work out how to go between hexadecimal and binary Denary Binary Hexadecimal Data: Hexadecimal

Converting to Hexadecimal Binary and hexadecimal neatly come together in a 1:4 ratio Converting binary to hexadecimal is easy We separate the binary number into groups of 4 Adding most-significant zero’s as needed Then translate each group into a hexadecimal digit Finally, we write those digits in order Example We have: 0110012 (2510) First we make the groups and add 0’s as needed 0001 1001 We get the denary value of each group (and get their hexadecimal value) 00012 = 110 = 116 10012 = 910 = 916 Then we write the digits in order 1916 Data: Hexadecimal

Convert the following denary values into hexadecimal 28 11 39 150 200 255 https://funtechacademies.co.uk/Academies/Timer/timer.html ANSWERS From top-left to bottom-right: 1C B 27 96 C8 FF Data: Hexadecimal

Converting from Hexadecimal Converting from hexadecimal to binary works in the exact opposite way We split the hexadecimal number into its digits We find the denary value of each digit We convert that denary value into a 4-bit binary number Finally, we write the binary numbers in order From left-to-right Example We have: A516 First we split the number into its digits (and convert each one into denary) A16 = 1010 516 = 510 Then we convert each number into 4-bit binary 1010 = 10102 510 = 01012 Then we write these numbers on after the other 101001012 Data: Hexadecimal

Convert the following denary values into hexadecimal B1 CD D7 https://funtechacademies.co.uk/Academies/Timer/timer.html ANSWERS From top-left to bottom-right: 242 161 140 177 205 215 Data: Hexadecimal

Some Uses of Hexadecimal There are two common uses of hexadecimal Colours Some systems use 1 byte per colour (red, green, and blue) Makes 24-bits in total Can be shortened to a 6-digit hexadecimal number Memory Addresses Come in 32-bit or 64-bit binary values Can be shortened to 8- or 16- digit hexadecimal numbers Useful Note In programming languages: 10: a denary value 1010 0x10: a hexadecimal value 1610 Data: Hexadecimal