Topic 1: Data Representation

Slides:



Advertisements
Similar presentations
I can order decimal numbers up to three decimal places (4a)
Advertisements

Integers. Integer Storage Since Binary consists only of 0s and 1s, we can’t use a negative sign ( - ) for integers. Instead, the Most Significant Bit.
Registers and Ranges. Register – Compared to a Calculator If there are only 9 digits available on display how long can the number displayed be? ANS: 9.
Faculty of Computer Science © 2006 CMPUT 229 Floating Point Representation Operating with Real Numbers.
Binary Representation Introduction to Computer Science and Programming I Chris Schmidt.
MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Lecture 3 Number System.
2-1 Computer Organization Part Fixed Point Numbers Using only two digits of precision for signed base 10 numbers, the range (interval between lowest.
1 CSE1301 Computer Programming Lecture 33 Supplement: Conversions: Unsigned Binary to Decimal Decimal to Unsigned Binary.
Binary numbers. 1 Humans count using decimal numbers (base 10) We use 10 units: 0, 1, 2, 3, 4, 5, 6, 7, 8 and (5.
IP Addressing and Subnetting
 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.
Computer Science 210 Computer Organization Floating Point Representation.
Review Binary Basic Conversion Binary Decimal
Floating Point Numbers.  Floating point numbers are real numbers.  In Java, this just means any numbers that aren’t integers (whole numbers)  For example…
Number Systems Computer Science 210 Computer Organization.
Revision Introductory Lesson
Computer Organization & Programming Chapter2 Number Representation and Logic Operations.
Fixed point binary numbers. Objectives  Draw a distinction between integers and numbers with a fractional part in a computer context.  Describe how.
Calculating Two’s Complement. The two's complement of a binary number is defined as the value obtained by subtracting the number from a large power of.
Representing numbers and Basic MATLAB 1. Representing numbers  numbers used by computers do not behave the same as numbers used in mathematics  e.g.,
Representation of Data Ma King Man. Reference Text Book: Volume 2 Notes: Chapter 19.
Number System. Number Systems Important Number systems – Decimal – Binary – Hexadecimal.
Number Representation
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
Data Representation Hexadecimal  Although computers work in binary it is sometimes inconvenient for humans to read everything in Binary. For example in.
Codes Octal Power Hexadecimal ASCII BCD Code
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
Number Representation Lecture Topics How are numeric data items actually stored in computer memory? How much space (memory locations) is.
Lecture 6 Excess Notation. Excess 8 notation indicates that the value for zero is the bit pattern for 8, that is 1000 Excess 8 notation indicates that.
GCSE Computing#BristolMet Session Objectives#8 MUST add two 8-bit binary integers SHOULD explain overflow errors COULD provide solutions to limit overflow.
DIGITAL LOGIC DESIGN TOPIC: NUMBER SYSTEMS OPERATIONS AND CODES:
Representation of Data (Part II) Computer Studies Notes: chapter 19 Ma King Man.
Introduction to Number Representation A451 GCSE Computing.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
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 Part 2. Counting in Binary DecimalBinary
Number Systems Decimal Can you write 12,045 in expanded form? Base? Allowable digits for each place?
Floating Point Numbers
Topic: Binary Encoding – Part 2
Computer Science 210 Computer Organization
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Computer Architecture & Operations I
COMPUTER ORGANIZATION
Introduction To Computer Science
Computer Science 210 Computer Organization
CSE 102 Introduction to Computer Engineering
2.0 COMPUTER SYSTEM 2.2 Number System and Representation
COUNTING IN BINARY Binary weightings 0 x x x x 8
Computer Science 210 Computer Organization
1. Number Systems.
Floating Point Representation
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Dividing Decimals.
1.6) Storing Integer:.
CS 101 – Sept. 4 Number representation Integer Unsigned √ Signed √
CSCI 6307 Foundation of Systems – Exercise (1)
Starter Using the fingers on only one hand, what is the highest number you can count to? Rules: You must start at 1 You must count sequentially (i.e.
COUNTING IN BINARY Binary weightings 0 x x x x 8
Write the number that is half way between these 2 numbers.
Representation of real numbers
Binary to Decimal Conversion
Normalised Floating Point Numbers
Hexadecimal.
COMS 161 Introduction to Computing
Machine epsilon eps returns the distance from 1.0 to the next largest floating point number. When eps is machine epsilon, the logic 1+eps>1 is TRUE.
Binary.
6 ages are listed from smallest to biggest
1.6) Storing Integer: 1.7) storing fraction:
Presentation transcript:

Topic 1: Data Representation Computer Systems Topic 1: Data Representation

Decimal Number System (3x100) + (4x10) + (5x1) =300 + 40 + 5 =34510 102 101 100 100’s 10’s 1’s 3 4 5 (3x100) + (4x10) + (5x1) =300 + 40 + 5 =34510

Conversion of binary to decimal 27 26 25 24 23 22 21 20 128’s 64’s 32’s 16’s 8’s 4’s 2’s 1’s 1 (1x128) + (0x64) + (1x32) + (1x16) + (1x8) + (0x4) + (1x2) + (0x1) =128 + 32 + 16 + 8 + 2 =18610

Binary to decimal conversion – practice 1011 1 1010 1101 1 0001 0011 111 1111 1000 0000 101 1101 0001 11 1001 0110 110 0010 0101 Binary to decimal conversion – practice

Higher Past Paper Questions 2009 Q1a – Write the binary number 1000100111 as a positive integer. Higher Past Paper Questions

Conversion of decimal to binary – method 1 72 – 64 = 8 8 – 8 = 0

Conversion of decimal to binary – method 2 72 36 R 0 18 R 0 9 R 0 4 R 1 2 R 0 1 R 0 0 R 1 64 32 16 8 4 2 1 = 1 0 0 1 0 0 0 = 64 + 8 = 72

Decimal to binary conversion – practice 134 148 394 29 18 79 273 172 Decimal to binary conversion – practice

Higher Past Paper Questions 2005 Q6a – What is the number 385 represented as a binary number? Higher Past Paper Questions

Range of positive integers 22 21 20 4 2 1 smallest = 0 largest = 7 So for 3 bits, the range is 0..7 0..23 - 1

Range of positive integers 27 26 25 24 23 22 21 20 128 64 32 16 8 4 2 1 smallest = 0 largest = 255 So for 8 bits, the range is 0..255 0..28 – 1 So for n bits, the range is 0..2n - 1

Range of positive integers - practice What is the range of positive integers that can be represented using 8 bits? What is the range of positive integers that can be represented using 12 bits? What is the range of positive integers that can be represented using n bits? Range of positive integers - practice

Maximum positive integer versus range Maximum positive integer is the largest number which can be represented by a number of bits e.g. for 8 bits the maximum positive integer is 28 – 1 = 255 The range involves two numbers, the smallest number and the largest number e.g. for 8 bits the range is 0..255 Maximum positive integer versus range

Higher Past Paper Questions 2011 Q1 – State the largest whole number that can be stored as a 10-bit positive integer. Higher Past Paper Questions