Binary and Hexadecimal Numbers

Slides:



Advertisements
Similar presentations
Computer Basics Binary Bits & Bytes
Advertisements

Lecture # 2 Computer Hardware Computers are all around! Grocery store Schools Libraries Bank Mail Malls We interact with computers everyday! We interact.
Vocabulary Electronic pulses Transistors Decimal numbers
1 Chapter 2 The Digital World. 2 Digital Data Representation.
Digital Data Representation
ENGR2216 FORTRAN PROGRAMMING FOR ENGINEERS. Chapter 1 The computer CPU MEMORY INPUT/OUTPUT DEVICES DATA REPRESENTATION BINARY SYSTEM OCTAL & HEXADECIMAL.
Representing Data, Pictures, Time, and Size in Computer
Binary and Hexadecimal Numbers
Binary Expression Numbers & Text CS 105 Binary Representation At the fundamental hardware level, a modern computer can only distinguish between two values,
Unit 3—Part A Computer Memory
Introduction to Information Technology
IT-101 Section 001 Lecture #4 Introduction to Information Technology.
Number Systems & Logic Gates Day 1
Representing Information in Binary (Continued)
Hexadecimal and ASCII Lesson Objective: Understand the purpose of ASCII and how to use it. Lesson Outcome: Convert between Hexadecimal and ASCII Convert.
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.
Communications Technology 2104 Mercedes Lahey. Bit 1. bit=From a shortening of the words “binary digit” 2. the basic unit of information for computers.
Memory Terminology & Data Representation CSCI 1060 Fall 2006.
1 CSC103: Introduction to Computer and Programming Lecture No 2.
Bits and Bytes in a computers memory Inside the computer are millions of electronic switches. These are grouped together in bundles of 8. A switch can.
Computer Systems Chapter 1 Pages Hardware-physical pieces Key hardware components in a computer system: The physical parts. – Central processing.
MAC OS – Unit A Page: 10-11, Investigating Data Processing Understanding Memory.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
Chapter 2 Computer Hardware
Tomorrow’s Technology and You 8/e Chapter 2 Hardware Basics: Inside the Box.
Data Representation A series of eight bits is called a byte. A byte can be used to represent a number or a character. As you’ll see in the following table,
Slide 1 Wednesday, October 07, 2015 Low Level Machine.
Fill in the blanks: (1) _________ has only two possible values 0 and 1. (2) There are __________bits in a byte. (3) 1 kilobyte of memory space can store.
What do computers know?  All they really know is on or off.  Kind of like a light switch  Computers aren’t nearly as smart as you are!
Lecture Binary and Hexadecimal Numbers. How Machines Think Computers handle two types of information: –Instructions –Data The "words" of a machine language.
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.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Unit 2—Part A Computer Memory Computer Technology (S1 Obj 2-3)
Bits and Bytes IGCSE. A binary number is either a 0 or a 1 and is known as a 'bit' or b inary dig it. However, the CPU cannot deal with just one bit at.
Computer Science Binary. Binary Code Remember the power supply that is inside your computer and how it sends electricity to all of the components? That.
Hexadecimal Data Representation. Objectives  Know how the Hexadecimal counting system works  Be able to convert between denary, binary & hexadecimal.
Data Representation Bits, Bytes, Binary, Hexadecimal.
Springfield Technical Community College Center for Business and Technology.
DIGITAL LANGUAGE
Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.
Business Programming I Fall – 2000 By Jim Payne Lecture 05Jim Payne - University of Tulsa2 Alphanumeric Storage Numbers that are not numbers? Alphabetic.
What’s a Computer? Analog, Digital does it matter? Technically there are two categories of computers, analog or digital. Designs reflect two different.
Binary Decimal Hexadecimal
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
Understanding Computers
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
Number systems. Binary system. Bits and bytes. Modern computers “speak” in a digital language composed of 2 digits. The machine language of modern computers.
 Human language : commonly used to express feeling and understand what other people expression.  Computer language : are a languages by which a user.
Understanding binary Understanding Computers.
INFS 211: Introduction to Information Technology
Memory Parts of a computer
Information Support and Services
Intermediate 2 Computing
EPSII 59:006 Spring 2004.
Unit 2 Computer Memory Computer Technology (S1 Obj 2-3)
इंट्रस्टिंग बनने के लिए आपको इंट्रस्टेड होना पड़ेगा।
Unit 3—Part A Computer Memory
Representing Data How does a computer represent data?
Unit 3—Part A Computer Memory
Data Representation – Numbers
Information Representation
What’s a Computer? Analog, Digital does it matter?
MAC Address Your Computers Drivers License By Christy Kushner
Data Binary Conversion.
Chapter Four Data Representation in Computers By Bezawit E.
Information Technology Department
LO1 – Understand Computer Hardware
Technology 3 Bits & Bytes.
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
Presentation transcript:

Binary and Hexadecimal Numbers Lecture Binary and Hexadecimal Numbers

How Machines Think Computers handle two types of information: Instructions Data The "words" of a machine language are called instructions; each of these gives a command to the CPU A computer program (software) is a list of instructions that are executed by the CPU

Off and On Computers only recognize off and on, like a light switch These switches are represented as binary digits or… bits Instructions and data are composed only of a series of bits

Binary Numbers (Bits) Bits can be represented as: 1 or 0 On or Off Up or Down Open or Closed Yes or No Black or White Thick or Thin Long or Short

Bar Codes vs. RFID RFID (discuss in Lab 1) Radio Frequency Identification. Used by Walmart or other retailers to track goods Has a circuit that can be transmitted to nearby radio device Bar codes cost .005 cents per code RFID devices cost 7¢ to 30 ¢ per iterm

We count in Base 10 (Decimal) 101 15 100 98 97 16 99 17 22 23 24 21 20 18 19 96 95 4 5 3 2 1 6 7 12 13 11 10 8 9 14 Ran out of symbols (0-9), so increment the digit on the left by one unit.

Computers count in Base 2 (Binary) Counting in Binary is the same, but with only two symbols On (1) Off (0) 1011 1100 1010 1110 10000 1111 1001 1101 1000 1 110 10 11 101 100 111

Converting Binary to Decimal 1 0 1 0 1 1 0 0 128 64 32 16 8 4 2 1 128 + + 32 + + 8 + 4 + + 128 + 32 + 8 + 4 = 172

Converting Binary to Decimal 0 1 0 1 0 0 0 1 128 64 32 16 8 4 2 1 + 64 + + 16 + + + + 1 64 + 16 + 1 = 81

Converting Binary to Decimal - - -  -    128 64 32 16 8 4 2 1 + + + 16 + + 4 + 2 + 1 16 + 4 + 2 + 1 = 23

Converting Binary to Decimal         128 64 32 16 8 4 2 1 128 + + 32 + 16 + + 4 + 2 + 1 128 + 32 + 16 + 4 + 2 + 1 = 183

Bytes Eight bits form a single byte Byte Values: “00110011” is One Byte of Information Byte Values: 00000000 = 0 11111111 = 255 As a result, binary numbers almost always written as a full byte (00000001).

Size Matters Computer memory and storage capacities are represented by their size (megs, gigs, etc) 1 , 0   = 1 bit 4 bits = 1 hex character (nibble) 8 bits = 1 byte 2^10 = 1,024 bytes or 1 Kilobyte (thousand) 2^20 = 1,048,576 bytes or 1 Megabyte (million) 2^30 = 1,073,741,824 or 1 Gigabyte (billion) 2^40 = 1,099,511,627,776 bytes or 1 Terabyte (trillion)

Future Size Considerations Thousand, Million, Billion, Trillion, Quadrillion, Quintillian, Hexillion, Heptillion

Binary Influence Nintendo 64 Color Combinations Storage 64 = 01000000 Color Combinations 256 Colors Storage 1024 MB of RAM (1024 is 256 x 4) IP addresses: 255.255.255.255 IP address are comprised of 4 eight-bit numbers 111111111.11111111.11111111.11111111

Binary to Hexadecimal Base 16 instead of Base 2 16 characters are used instead of 2 Every Hex character represents 4 bits 4 bits = 1 nibble (or hex character) 2 nibbles (2 hex characters) = 1 byte Easier to get to larger numbers faster

Binary to Hexadecimal

Computers recognize Base 16 (hex) Counting in Hex is the same as counting in Bin, but with sixteen symbols Still translates to binary 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 = 0000 1 = 0001 2 = 0010 3 = 0011 4 = 0100 5 = 0101 6 = 0110 7 = 0111 8 = 1000 9 = 1001 A =1010 B = 1011 C = 1100 D=1101 E= 1110 F = 1111

Converting Hex to Bin

Base 16 Hex multiplies by 16 instead of 2 or 10 The hexadecimal system is useful because it can represent every byte (8 bits) as two consecutive hexadecimal digits. It is easier for humans to read hexadecimal numbers than binary numbers.

Let’s Practice Hex! 31 Base 10 = 30 + 1 or 31 Base 16 = 16 + 15 or 1F (remember only 1 character in hex --- hence we use the letter F to represent the number 15

Let’s Practice Hex! 160 Base 10 = 100+60+0 or 160 Base 2 = 128+0+32+0+0+0+0+0 0r 10100000 Base 16 = 16 x 10 (160) + 0 or A 0 (remember only 1 character in hex --- hence we use the letter A to represent the number 10

Let’s Practice Hex! 250 Base 10 = 200+50+0 or 250 Base 16 = 16 x 15 = 240 + 1 x 10 = 10 or F A (remember only 1 character in hex --- hence we use the letter F to represent the number 15

Let’s Practice Hex! 179 Base 10 = 100 + 70 + 9 or 179 Base 16 = 16 x 11 = 176 + 1 x 3 or B 3 (remember only 1 character in hex --- hence we use the letter B to represent the number 11

ASCII (Character Set) Provides a means for a byte to represent a number 0100 0001 (41 Hex) (65 Dec) = A 0100 0010 (42 Hex) (66 Dec) = B Upper-case and lower-case have separate values. Numbers and symbols are there too. Boolean Algebra

AASCII Table 1-31 Control Codes 32-64 Symbols 65-90 Uppercase 91-96 More Symbols 97-122 Lowercase 123-126 More Symbols 127 Delete 128-255 International Symbols

AASCII Table Link to complete ASCII Chart

Alpha to Hex to Binary nibbles 8 4 2 1 8 4 2 1 C (43) O (4F) M (4D) P (50) 2 (32) 5 (35) 0100 0011 0100 1111 0100 1101 0101 0000 0011 0010 0011 0101 Hex gets there “FASTER” than Binary only for programming code

ASCII Symbols and Characters ! @ (space) " 33 or #21 or 0010 0001 64 or #40 or 0100 0000 32 or #20 or 0010 0000 34 or #22 or 0010 0010 Hex Characters convert to binary so each symbol has a binary representation

Windows Calculator for Binary 1. Type your number. 3. See new value. 2. Choose notation.

Windows Calculator for Hex 1. Type your number. 3. See new value. 2. Choose notation.

There are 10 types of people in the world There are 10 types of people in the world... Those who understand binary, and those who don’t.