Data Representation – Chapter 3 Section 3-1. Terminology “Digital” –Discrete, well defined values/steps –Opposite of analog –Analogy: digital is to analog.

Slides:



Advertisements
Similar presentations
CIS 020 Assembly Programming Chapter 02 - Numbering Systems & Data Representation © John Urrutia 2012, All Rights Reserved.5/27/20121.
Advertisements

Digital Fundamentals Floyd Chapter 2 Tenth Edition
CHAPTER 2: Number Systems
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Chapter 02 Binary Values and Number Systems Nell Dale & John Lewis.
 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.
CISC1400: Binary Numbers & Computer Fall 2011, Dr. Zhang 1.
Data Representation in Computers. Data Representation in Computers/Session 3 / 2 of 33 Number systems  The additive approach – Number earlier consisted.
Numbering Systems Decimal (Denary) base 10. Clumsy when dealing with computers. Other systems –Binary –Octal –Hexadecimal Convenient when dealing with.
Real Numbers and the Decimal Number System
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Simple Data Type Representation and conversion of numbers
CS105 INTRODUCTION TO COMPUTER CONCEPTS BINARY VALUES & NUMBER SYSTEMS Instructor: Cuong (Charlie) Pham.
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.
1 Digital Technology and Computer Fundamentals Chapter 1 Data Representation and Numbering Systems.
Chapter 3 Data Representation
NUMBER SYSTEM AND COMPUTER CODES Chapter 2. Prelude Fingers, sticks, and other things for counting were not enough! Counting large numbers Count in groups.
Chapter 3 Section 1 Number Representation Modern cryptographic methods, unlike the classical methods we just learned, are computer based. Representation.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Data Representation – Chapter 3 Section 3-1. Terminology “Digital” –Discrete, well defined values/steps –Opposite of analog –Analogy: digital is to analog.
Engineering 1040: Mechanisms & Electric Circuits Spring 2014 Number Systems.
1-1 Lecture 1 Class Overview and Appendix A -- Number Systems.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System.
Number Systems Ron Christensen CIS 121.
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
Number systems, Operations, and Codes
CHAPTER 3: Number Systems
Representing Information Digitally (Number systems) Nell Dale & John Lewis (adapted by Erin Chambers, Michael Goldwasser, Andrew Harrington)
Positional Notation 642 in base 10 positional notation is:
CISC1100: Binary Numbers Fall 2014, Dr. Zhang 1. Numeral System 2  A way for expressing numbers, using symbols in a consistent manner.  " 11 " can be.
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Data Representation, Number Systems and Base Conversions
Dale & Lewis Chapter 2 Binary Numbers and Number Systems.
CSC 107 – Programming For Science. Positional Notation  Used in nearly all modern numerical systems  Right-to-left ordering of digits within larger.
Lecture 1: 8/27/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
 Lecture 2 Processor Organization  Control needs to have the  Ability to fetch instructions from memory  Logic and means to control instruction sequencing.
Discrete Mathematics Numbering System.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
CHAPTER 3: Number Systems
ECE DIGITAL LOGIC LECTURE 2: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/14/2016.
CSC 110 – Intro to Computing Lecture 3: Converting between bases & Arithmetic in other bases.
Number Systems. ASCII – American Standard Code for Information Interchange – Standard encoding scheme used to represent characters in binary format on.
Binary numbers. Primary memory Memory = where programs and data are stored – Unit = bit “BIT” is a contraction for what two words? Either a 1 or a 0 (because.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Digital logic COMP214  Lecture 2 Dr. Sarah M.Eljack Chapter 1 1.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Dr. Nermin Hamza 1. Materials Book: Digital Design 4 th M. Morris Mano and Michael D. Ciletti 2.
NUMBER SYSTEMS.
Discrete Mathematics Numbering System.
Number Representation
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
COMPUTING FUNDAMENTALS
Chapter 3 Data Representation
Number System conversions
University of Gujrat Department of Computer Science
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
Chapter 4 Number Systems.
Overview Digital Systems and Computer Systems
Numbering System TODAY AND TOMORROW 11th Edition
Chapter 2: Number Systems
Digital Logic Design (CSNB163)
Chapter Four Data Representation in Computers By Bezawit E.
Information Representation
UNIT – 3 & 4. Data Representation and Internal
CHAPTER 69 NUMBER SYSTEMS AND CODES
Presentation transcript:

Data Representation – Chapter 3 Section 3-1

Terminology “Digital” –Discrete, well defined values/steps –Opposite of analog –Analogy: digital is to analog as int is to double “Binary” –A system consisting of two states –on/off, true/false, yes/no, high/low, 0/1 –Basis for modern computers

Terminology “Bit” –Binary-digit –Smallest unit of storage in modern computers

Data Representation – what does this “mean”? –one million, one –sixteen million, seven hundred seventy seven thousand, two hundred, seventeen –two hundred sixty two thousand, one hundred forty five –sixty five –“A” –AJMP assembly language instruction

Data Representation –Decimal number –Hexadecimal number –Octal number –Binary number –ASCII character –8051 machine instruction

Number Systems A number system is defined by its base or radix –The number of unique digits used in the system –Digits range in value from 0 to radix-1 –Larger values are created by stringing together digits Resultant value is defined by d: digit, b: base, i: position with 0 being the first position to the left of the “base point”, increasing to the left, decreasing to the right

Number Systems Binary is convenient/efficient for use in a computer… –Electronic circuits can be easily designed to deal with two distinct levels e.g. TTL 0-volts and 5-volts … but extremely inconvenient for human consumption –Humans were designed to work with ten distinct levels e.g. fingers We’ll concentrate on decimal, hexadecimal, octal, and binary

Conversion Base b to decimal, b = 2 (binary) Decimal to base b –Integer divide value by b –Output remainder –Repeat on quotient –Until quotient is zero ValueQuotient Value / 2 Remainder Value %

Conversion Binary to octal –Separate binary number into groups of 3 binary digits padding the left with 0’s if necessary –Convert groups to decimal digits > > 11 8

Conversion Binary to hexadecimal –Separate binary number into groups of 4 binary digits padding the left with 0’s if necessary –Convert groups to decimal digits > > (?) –Not exactly — > A 16 —F 16 i.e ABCDEF

Conversion Octal to hexadecimal and hexadecimal to octal –Convert to binary then to the target radix using previous methods

Conversion Octal and hexadecimal are useful when working closely with the architecture –Designing circuits –Designing device interfaces –Writing assembly language programs In such situations one is generally concerned with bit patterns rather than the decimal value The conversions can be done in your head

Assignment 1.Write a Java program that takes in a decimal number and prints out the binary representation prints out the octal representation prints out the hexadecimal representation 2.Write a Java program that takes in an binary number and prints out the octal representation prints out the decimal representation prints out the hexadecimal representation 3.Write a Java program that takes in an octal number and prints out the binary representation prints out the decimal representation prints out the hexadecimal representation 4.Write a Java program that takes in a hexadecimal number and prints out the binary representation prints out the octal representation prints out the decimal representation DO NOT utilize Java API functions Integer.toHexString() Integer.toOctalString() Integer.toBinaryString() or any other API or formatting functions that I might have overlooked that do the conversions for you!!! You are to do this by pulling digits from numbers using addition, subtraction, multiplication, division, modulo, or any other arithmetic operators and then doing the specified mathematical operations for the conversion

Assignment Turn in –Print out of your code –Print out of the results (inputs and outputs) of your code (this can be screen shots) –Please make sure your code actually works and produces the proper answers (i.e. test your code!) Due Tuesday at the start of class Late assignments will received reduced credit