1 CSCE 1020.002 Binary and Hexadecimal Numbers. Binary Numbers Computers store and process data in terms of binary numbers. Binary numbers consist of.

Slides:



Advertisements
Similar presentations
1 3 Computing System Fundamentals 3.5 Data Representation.
Advertisements

EE1A2 Microprocessor Systems & Digital Logic Part I Digital Electronic System Design Dr. T. Collins.
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.
CS 151 Digital Systems Design Lecture 3 More Number Systems.
CSC 110 – Intro to Computing Lecture 4: Arithmetic in other bases & Encoding Data.
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
 A binary number is a number that includes only ones and zeroes.  The number could be of any length  The following are all examples of binary numbers.
John Owen, Rockport Fulton HS1 Computer Science LESSON 2 ON Number Bases.
CISCO NETWORKING ACADEMY Chabot College ELEC 74A Hexadecimal Introduction.
Computer Systems 1 Fundamentals of Computing
COE 202: Digital Logic Design Number Systems Part 1
 Binary Binary  Binary Number System Binary Number System  Binary to Decimal Binary to Decimal  Decimal to Binary Decimal to Binary  Octal and Hexadecimal.
Chapter 1 1 Number Systems. 2 Objectives  Understand why computers use binary (Base-2) numbering.  Understand how to convert Base-2 numbers to Base-
Number System Review This section reviews binary numbers, hexadecimal numbers, and binary arithmetic © 2014 B. Wilkinson Modification date: Dec 29,
Numbering Systems Decimal (Denary) base 10. Clumsy when dealing with computers. Other systems –Binary –Octal –Hexadecimal Convenient when dealing with.
Revision Introductory Lesson
Binary and Hexadecimal Numbers
IT-101 Section 001 Lecture #3 Introduction to Information Technology.
Numbering Systems. CSCE 1062 Outline What is a Numbering System Review of decimal numbering system Binary representation range Hexadecimal numbering system.
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 !!!
Data Representation in Computer Systems. 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers.
Number Representation. Representing numbers n Numbers are represented as successive powers of a base, or radix.
The Hexadecimal Number System and Memory Addressing ISAT 121.
© 2010 Cisco Systems, Inc. All rights reserved. 1 Network Math.
Converting From decimal to Binary & Hexadecimal to Binary
Module 2.6 Adding Two Digit Numbers Hundred Chart.
Hexadecimal. Overview Hexadecimal (hex) ~ base 16 number system Use 0 through 9 and... A = 10 B = 11 C = 12 D = 13 E = 14 F = 15.
Chapter 2 Bits, Data Types, and Operations. 2-2 Hexadecimal Notation It is often convenient to write binary (base-2) numbers as hexadecimal (base-16)
Binary, Hexadecimal, Decimal, and How They Relate.
Data Representation Hexadecimal  Although computers work in binary it is sometimes inconvenient for humans to read everything in Binary. For example in.
Visualizing Decimal and Binary
Announcement!!! First exam next Thursday (I’m trying to give you a first exam before the drop date) I’ll post a sample exam over the weekend and will try.
Discrete Mathematics Numbering System.
NUMBER SYSTEMS.
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.
Computer Science LESSON 2 ON Number Bases.
The Hexadecimal Number System Representation of Data in Computer Systems.
 2012 Pearson Education, Inc. Slide Chapter 4 NumerationSystems.
CSC 110 – Intro to Computing Lecture 3: Converting between bases & Arithmetic in other bases.
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.
Hexadecimal numbers. Announcements Meeting of the Mathematics and Computing Society, Thursday 12:30pm BSC 126 Help available in Math Lab Check homework.
Computer Maintenance Numbering Systems Copyright © Texas Education Agency, All rights reserved.1.
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.
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.
Programmable Logic Controller
Decimal Numbers.
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Computer Maintenance Numbering Systems Trade & Industrial Education
Binary and Hexadecimal
Different Numeral Systems
Discrete Mathematics Numbering System.
Digital Electronics INTRODUCTION ANALOG VS DIGITAL NUMBER SYSTEMS.
ITE102 – Computer Programming (C++)
Tools of Web Development 1: Module A: Numbering Systems
Number Systems Base 2, 10, 16.
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Binary / Hex Binary and Hex The number systems of Computer Science.
Binary Lesson 3 Hexadecimal
Digital Electronics and Microprocessors
Binary Lesson 3 Hexadecimal
Binary Lesson 3 Hexadecimal
Binary Lesson 3 Hexadecimal
Binary Lesson 4 Hexadecimal and Binary Practice
Binary Lesson 4 Hexadecimal and Binary Practice
Computer Science 1 Binary and Hexadecimal Numbers
Section 6 Primitive Data Types
Presentation transcript:

1 CSCE Binary and Hexadecimal Numbers

Binary Numbers Computers store and process data in terms of binary numbers. Binary numbers consist of only the digits 1 and 0. It is important for Computer Scientists and Computer Engineers to understand how binary numbers work. 2 Note: “Binary Numbers” are also referred to as “Base 2” numbers.

Review of Placeholders You probably learned about placeholders in the 2 nd or 3 rd grade. For example: ’s place10’s place100’s place1000’s place So this number represents 3 thousands 1 hundred 2 tens 5 ones Mathematically, this is (3 x 1000) + (1 x 100) + (2 x 10) + (5 x 1) = = 3125 But why are the placeholders 1, 10, 100, 1000, and so on?

More on Placeholders The numbers commonly used by most people are in Base 10. The Base of a number determines the values of its placeholders place10 1 place10 2 place10 3 place To avoid ambiguity, we often write the base of a number as a subscript.

Binary Numbers - Example place2 1 place2 2 place2 3 place This subscript denotes that this number is in Base 2 or “Binary”. 1’s place2’s place4’s place8’s place

Binary Numbers - Example ’s place2’s place4’s place8’s place So this number represents 1 eight 0 fours 1 two 0 ones Mathematically, this is (1 x 8) + (0 x 4) + (1 x 2) + (0 x 1) = = 10 10

Which Digits Are Available in which Bases 7 Base Base digits 2 digits Base A B C D E F digits Note: Base 16 is also called “Hexadecimal” or “Hex”. Base 16 Cheat Sheet A 16 = B 16 = C 16 = D 16 = E 16 = F 16 = Add Placeholder

Hexadecimal Numbers - Example place16 1 place16 2 place 3AB 16 This subscript denotes that this number is in Base 16 or “Hexadecimal” or “Hex”. 1’s place16’s place256’s place Note: 16 2 = 256

Hexadecimal Numbers - Example 9 3AB 16 1’s place16’s place256’s place So this number represents 3 two-hundred fifty-sixes 10 sixteens 11 ones Base 16 Cheat Sheet A 16 = B 16 = C 16 = D 16 = E 16 = F 16 = Mathematically, this is (3 x 256) + (10 x 16) + (11 x 1) = =

Why Hexadecimal Is Important 10 What is the largest number you can represent using four binary digits? _ _ ==== = … the smallest number? _ _ = 0 10 What is the largest number you can represent using a single hexadecimal digit? Base 16 Cheat Sheet A 16 = B 16 = C 16 = D 16 = E 16 = F 16 = _ 16 F = … the smallest number? _ 16 0 = 0 10 Note: You can represent the same range of values with a single hexadecimal digit that you can represent using four binary digits!

Why Hexadecimal Is Important Continued 11 It can take a lot of digits to represent numbers in binary. Example: = Long strings of digits can be difficult to work with or look at. Also, being only 1’s and 0’s, it becomes easy to insert or delete a digit when copying by hand. Hexadecimal numbers can be used to abbreviate binary numbers. Starting at the least significant digit, split your binary number into groups of four digits. Convert each group of four binary digits to a single hex digit.

Converting Binary Numbers to Hex 12 Recall the example binary number from the previous slide: First, split the binary number into groups of four digits, starting with the least significant digit. Next, convert each group of four binary digits to a single hex digit. CA52 Base 16 Cheat Sheet A 16 = B 16 = C 16 = D 16 = E 16 = F 16 = Put the single hex digits together in the order in which they were found, and you’re done! 16

13 In many situations, instead of using a subscript to denote that a number is in hexadecimal, a “ 0x ” is appended to the front of the number. Look! Hexadecimal Numbers! Windows “Blue Screen of Death”

Converting Decimal to Binary 14 Example: We want to convert to binary. 125 / 2 = 62 R 1 62 / 2 = 31 R 0 31 / 2 = 15 R 1 15 / 2 = 7 R 1 7 / 2 = 3 R 1 3 / 2 = 1 R 1 1 / 2 = 0 R =

Converting Decimal to Hex 15 Example: We want to convert to hex. 125 / 16 = 7 R 13 7 / 16 = 0 R = 7D 16 Base 16 Cheat Sheet A 16 = B 16 = C 16 = D 16 = E 16 = F 16 = 15 10