Hexadecimal Numbers. Journal: If you were to extend our numbering system to more digits, what digits would you use? Why those?

Similar documents
Signed umbers. Sign/Magnitude otation

Number System. Introduction. Decimal Numbers

Chapter 2 Bits, Data Types, and Operations

Objectives. Connecting with Computer Science 2

Chapter 2 Bits, Data Types, and Operations

MACHINE LEVEL REPRESENTATION OF DATA

Chapter 2 Bits, Data Types, and Operations

or 5.00 or 5.000, and so on You can expand the decimal places of a number that already has digits to the right of the decimal point.

CS & IT Conversions. Magnitude 10,000 1,

The type of all data used in a C++ program must be specified

UNIT 7A Data Representation: Numbers and Text. Digital Data

Fractions. There are several terms that are commonly used when working with fractions.

Introduction to Computers and Programming. Numeric Values

Electronic Data and Instructions

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

Number Systems. Binary Numbers. Appendix. Decimal notation represents numbers as powers of 10, for example

Chapter 2 Exercises and Answers

Inf2C - Computer Systems Lecture 2 Data Representation

Chapter 2 Bits, Data Types, and Operations

Chapter 2 Bits, Data Types, and Operations

Math Glossary Numbers and Arithmetic

Decimal Binary Conversion Decimal Binary Place Value = 13 (Base 10) becomes = 1101 (Base 2).

Number Systems. Both numbers are positive

Data Representation 1

Chapter 2. Data Representation in Computer Systems

The type of all data used in a C (or C++) program must be specified

A complement number system is used to represent positive and negative integers. A complement number system is based on a fixed length representation

10.1. Unit 10. Signed Representation Systems Binary Arithmetic

Variables and Data Representation

Chapter Three. Arithmetic

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Homework 1 graded and returned in class today. Solutions posted online. Request regrades by next class period. Question 10 treated as extra credit

CS101 Lecture 04: Binary Arithmetic

Numeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects:

Computer Arithmetic. In this article we look at the way in which numbers are represented in binary form and manipulated in a computer.

Basic Definition INTEGER DATA. Unsigned Binary and Binary-Coded Decimal. BCD: Binary-Coded Decimal

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

Characters, Strings, and Floats

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

Number Systems CHAPTER Positional Number Systems

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS

Under the Hood: Data Representation. Computer Science 104 Lecture 2

Course Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation

QUIZ: Generations of computer technology. Hardware:

Positional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal

Introduction to Numbering Systems

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation

Chapter 2 Binary Values and Number Systems

Decimal & Binary Representation Systems. Decimal & Binary Representation Systems

N.B. These pastpapers may rely on the knowledge gained from the previous chapters.

unused unused unused unused unused unused

Digital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes

Example 2: Simplify each of the following. Round your answer to the nearest hundredth. a

Rational and Irrational Numbers

Chapter 1 Section 1 Lesson: Solving Linear Equations

2. MACHINE REPRESENTATION OF TYPICAL ARITHMETIC DATA FORMATS (NATURAL AND INTEGER NUMBERS).

1.1 Information representation

Digital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer.

Digital Fundamentals

DIGITAL SYSTEM DESIGN

Integers are whole numbers; they include negative whole numbers and zero. For example -7, 0, 18 are integers, 1.5 is not.

Excerpt from "Art of Problem Solving Volume 1: the Basics" 2014 AoPS Inc.

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Digital Computers and Machine Representation of Data

Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2

COMP2611: Computer Organization. Data Representation

Fraction to Percents Change the fraction to a decimal (see above) and then change the decimal to a percent (see above).

Unit 7 Number System and Bases. 7.1 Number System. 7.2 Binary Numbers. 7.3 Adding and Subtracting Binary Numbers. 7.4 Multiplying Binary Numbers

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

Section 1.8. Simplifying Expressions

Algebra 1 Review. Properties of Real Numbers. Algebraic Expressions

Number Systems Using and Converting Between Decimal, Binary, Octal and Hexadecimal Number Systems

Divisibility Rules and Their Explanations

Floating Point Arithmetic

E40M. Binary Numbers, Codes. M. Horowitz, J. Plummer, R. Howe 1

QUIZ: Generations of computer technology. Hardware:

Chapter 2. Binary Values and Number Systems

9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation

Chapter 3: Arithmetic for Computers

What Is It? Instruction Register Address Register Data Register

Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee

CS113: Lecture 3. Topics: Variables. Data types. Arithmetic and Bitwise Operators. Order of Evaluation

Numbers and Computers. Debdeep Mukhopadhyay Assistant Professor Dept of Computer Sc and Engg IIT Madras

CS2630: Computer Organization Homework 1 Bits, bytes, and memory organization Due January 25, 2017, 11:59pm

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr

Bits, bytes, binary numbers, and the representation of information

Chapter 3 DATA REPRESENTATION

Beyond Base 10: Non-decimal Based Number Systems

Computer Organization

Level ISA3: Information Representation

COSC 243. Data Representation 3. Lecture 3 - Data Representation 3 1. COSC 243 (Computer Architecture)

COMPETENCY 1.0 UNDERSTAND THE STRUCTURE OF THE BASE TEN NUMERATION SYSTEM AND NUMBER THEORY

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Bits and Bytes and Numbers

Basic Arithmetic Operations

COMP2121: Microprocessors and Interfacing. Number Systems

Bits, Words, and Integers

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR

Transcription:

9/10/18 1 Binary and Journal: If you were to extend our numbering system to more digits, what digits would you use? Why those? Hexadecimal Numbers

Check Homework

3 Binary Numbers A binary (base-two) number is just like a decimal (base-ten) number, except that instead of ten possible digits (0...9), we only have two (0...1) 15 10 477 10 tens place ones place tens place hundreds place ones place 111 2 111011101 2 twos place fours place ones place QUESTION: What place value does this zero hold?

4 Hexadecimal It would be very inconvenient to write out a 64-bit address in binary: 0010100111010110111110001001011000010001110011011110000011100000 Instead, we group each set of 4 bits together into a hexadecimal (base 16) digit: The digits are 0, 1, 2,, 9, A (10), B (11),, E (14), F (15) 0010 1001 1101 0110 1111 1000 1001 0110 0001 0001 1100 1101 1110 0000 1110 0000 2 9 D 6 F 8 9 6 1 1 C D E 0 E 0 which we write, by convention, with a 0x preceding the number to indicate it s a hexadecimal number: 0x29D6F89611CDE0E0

Representing Information 5 Positive integers: Just use the binary number system Negative integers, letters, images, not so easy! There are many different ways to represent information Some are more efficient than others but once we ve solved the representation problem, we can use that information without considering how it s represented via

Representing Integers 6 Simplest idea ( ones complement ): Use one bit for a sign bit : 1 means negative, 0 means positive The other bits are complemented (flipped) in a negative number So, for example, +23 (in a 16-bit word) is represented as: 0000000000010111 and -23 is represented as: 1111111111101000 But there are two different ways to say zero (0000 and 1111 ) It s tricky to do simple arithmetic operations like addition in the ones complement notation This is solved by the twos complement representation, but we won t go over that

Floating Point Numbers 7 Non-integers are a problem Remember that any rational number can be represented as a fraction but we probably don t want to do this, since (a) we d need to use two words for each number (i.e., the numerator and the denominator) (b) fractions are hard to manipulate (add, subtract, etc.) Irrational numbers can t be written down at all, of course

Floating Point Numbers 8 We have limited precision, since we can only represent 2 32 different values in a 32-bit word 1/3 isn t exactly 1/3 (let s try it on a calculator!) In general, we also lose precision (introduce errors) when we operate on floating point numbers You don t need to know the details of how floating point numbers are represented

Representing Characters 9 ASCII representation: one byte [actually 7 bits ] == one letter == an integer from 0-128 No specific reason for this assignment of letters to integers! UNICODE is a popular 16-bit representation that supports accented characters like é [Chart borrowed from ha.ckers.org]

10 Other Types of Data What kinds of data do we represent on computers, and what are the forms?

The Scale of Data 11 Work with an elbow partner to answer these questions Computer Screen Each pixel is represented by three bytes (red, blue, green color values) A standard VGA screen is 600 pixels wide by 400 pixels high How many bits are needed to represent one VGA screen display? CD CDs are stored as digital samples There are 44,100 samples per second Each sample is represented by 16 bits How many bits are needed to represent one 3-minute song on a CD?

Representing instructions EVERYTHING in the computer is represented in binary, even the instructions. Create your own binary code to represent these equations: (NOT the answers, represent the equations themselves) 9 + 4 11 3 2 * 5 15 / 5 HINT: How many bits do you need to represent the data? They are whole numbers. The largest number is and requires bits How many different operations are there? Create a binary code for each operation. Write each equation in binary.

Homework Read the remainder of Chapter 1 in Blown To Bits (pages 13-17). Summarize by choosing one of each from the reading Key sentence Key phrase Key word CS Matters in Maryland