How Computers Represent Numbers Friday, Week 5. Binary Code A series of 1’s and 0’s Place value is in powers of 2.

Slides:



Advertisements
Similar presentations
Computer Codes Rohit Khokher. Computer Codes Data types NumericNonnumeric IntegerRealAlphabet A, B, C, …,Z a, b, c,…,z Digits 0,…,9 Special Characters.
Advertisements

How Computers Represent Numbers Friday, Week 5. Binary Code A series of 1’s and 0’s Place value is in powers of 2.
Processing Data.
Information Processing
Representation of Data How is data (numbers, characters) represented so that it can be used in a Computer ?
Data Representation in Computers
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
Number System Conversions Lecture L2.2 Section 2.3.
Number Systems & Logic Gates Day 1
Bits and Bytes.
COMPUTER FUNDAMENTALS David Samuel Bhatti
CODING SYSTEMS CODING SYSTEMS CODING SYSTEMS. CHARACTERS CHARACTERS digits: 0 – 9 (numeric characters) letters: alphabetic characters punctuation marks:
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.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
Basic Logic 2.1 Basic Digital Logic 2 Numbering Systems ©Paul Godin Created Aug 2007 Updated Aug 2013 gmail.com.
Binary Numbers and ASCII and EDCDIC Mrs. Cueni. Data Representation  Human speech is analog because it uses continuous signals (waves) that vary in strength.
Computer System Basics 1 Number Systems & Text Representation Computer Forensics BACS 371.
Chapter 2 Computer Hardware
Binary Arithmetic & Data representation
Computer Structure & Architecture 7c - Data Representation.
Chapter 3 Section 1 Number Representation Modern cryptographic methods, unlike the classical methods we just learned, are computer based. Representation.
HOW COMPUTERS MANIPULATE DATA Chapter 1 Coming up: Analog vs. Digital.
Numbering System Base Conversion. Number systems Decimal – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Binary – 0, 1 Octal – 0, 1, 2, 3, 4, 5, 6, 7 Hexadecimal system.
Chapter1: Number Systems
AP Computer Science A – Healdsburg High School 1 Unit 1 - Binary Numbers - Hexadecimal Numbers.
D ATA REPRESENTATION, BINARY SYSTEM, B IT, B YTE, ASCII C ODE Chapter 4 Lecturer In Charge: Manesh T 1.
Octal to Decimal Hexadecimal DecimalOctal Binary.
DECIMALBINARY a) b) c) d) e) f) Revision Exercise DECIMALBINARY a) b) c)
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Springfield Technical Community College Center for Business and Technology.
Data Representation (in computer system). Data Representation How do computers represent data? b The computers are digital Recognize.
Agenda Character representation Numerical Conversions ASCII EBCDIC
Computer Programming 12 Mr. Jean February 11 th, 2014.
Business Programming I Fall – 2000 By Jim Payne Lecture 05Jim Payne - University of Tulsa2 Alphanumeric Storage Numbers that are not numbers? Alphabetic.
Number Representation Lecture Topics How are numeric data items actually stored in computer memory? How much space (memory locations) is.
M204 - Data Representation
ASCII AND EBCDIC CODES By : madam aisha.
Characters and Strings
Cis303a_chapt03_exam1_answer.ppt CIS303A: System Architecture Exam 1: Chapter 3 Answer List the characters (digits) for the following bases. 1) Decimal:
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
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.
Number Systems. ASCII – American Standard Code for Information Interchange – Standard encoding scheme used to represent characters in binary format on.
A+ Computer Repair Lesson 3: Number System. Objectives Define binary, decimal, octal, and hexadecimal numbering systems. Define binary, decimal, octal,
Understanding Computers
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
Base 16 (hexadecimal) Uses the decimal digits and the first letters of the alphabet to encode 4 binary bits (16=2 4 ) abcdef or ABCDEF.
Lecture Coding Schemes. Representing Data English language uses 26 symbols to represent an idea Different sets of bit patterns have been designed to represent.
Some basic concepts underlying computer archi­tecture
Binary Representation in Text
Binary Representation in Text
Understanding binary Understanding Computers.
Digital Design Chapter One Digital Systems and Binary Numbers
Binary Numbers and ASCII and EDCDIC
Octal to Decimal Decimal Octal Binary Hexadecimal.
Unit 18: Computational Thinking
CSCI 198: Lecture 4: Data Representation
CSCI 161: Lecture 4: Data Representation
Bits & Bytes How Computers Represent Data
EPSII 59:006 Spring 2004.
Data Storage Introduction to computer, 2nd semester, 2010/2011
Number Systems and Binary Arithmetic
Computers & Programming Languages
COMS 161 Introduction to Computing
Chapter 2: Number Systems
COMS 161 Introduction to Computing
Learning Intention I will learn how computers store text.
Information Representation
Chapter 3 - Binary Numbering System
Presentation transcript:

How Computers Represent Numbers Friday, Week 5

Binary Code A series of 1’s and 0’s Place value is in powers of 2

The Decimal System Analyze the number 2,473 2,473 = 2 * * * *1 2,473 = 2 * 10^3 + 4 * 10^2 + 7 * 10^1 + 3 * 10^0 Each position in our number represents a different power of 10 Decimal is a base 10 system

Binary as Base = 1*2^6 + 0*2^5 + 1*2^4 + 1*2^3 + 0*2^2 + 0*2^1 +1*2^ = 1*64 + 0*32 + 1*16 + 1*8 + 0*4 + 0*2 + 1* = = 89 (decimal)

Base = 1*3^6 + 0*3^5 + 1*3^4 + 1*3^3 + 0*3^2 + 0*3^1 +1*3^ = 1* * *81 + 1*27 + 0*9 + 0*3 + 1* = = 838 (decimal)

Exercise Find the decimal equivalent of = 1*2^5 + 1*2^2 + 1*2^1 + 1*2^ = 1*32 + 1*4 + 1*2 + 1* = = 39 (decimal)

Hexadecimal System Base-16 system Needs digits 0 through 15 - we don’t have numbers for We use the letters A - F to represent the numbers

Exercise What would 3B in hexadecimal be in decimal? 3B = 3 * 16 ^ * 16 ^ 0 3B = 3 * * 1 3B = B = 59

More on hexadecimal 4 binary digits equal one hexadecimal number 0101 (binary) = 5 (hex) 1101 (binary) = D (hex) (binary) = 93 (decimal) = 5D (hex)

Decimal to Binary Divide by 2 and keep track of the remainders. 39 (decimal) = (binary) 39/2 =19Rem 1 19/2 =9Rem 1 9/2 =4Rem 1 4/2 =2Rem 0 2/2 =1Rem 0 1/2 =0Rem 1

Exercise Convert 89 (decimal) to binary 89 (decimal) = (binary) 89/2 =44R 1 44/2 =22R 0 22/2 =11R 0 11/2 =5R 1 5/2 =2R 1 2/2 =1R 0 1/2 =0R 1

Why use binary? Binary uses more digits than decimal, so why do we use it? Electronic hardware can either be ‘on’ or ‘off’ - nothing in between. Binary fits this pattern - ‘on’ state is 1 in binary and ‘off’ state is 0 in binary.

Numeric Representation of Letters and Digits In a computer, letters and digits are represented by numeric codes. Example Code: What does this say? ABCDEFGHIJKLM NOPQRSTUVWXYZ

ASCII and EBCDIC The 2 most common codes used in computers are ASCII (American Standard Code for Information Interchange) and EBCDIC (Extended Binary Coded Decimal Interchange Code). They provide codes for letters, digits, punctuation marks, and other special characters.

Sp!“#$%&‘()*+, / :; JKLMNOPQRSTUVW XYZ[\]^_`abcde fghijklmnopqrs tuvw xyz{|}~