Numerical Representation

Slides:



Advertisements
Similar presentations
Chapter 4: Representation of data in computer systems
Advertisements

1 Chapter 2 The Digital World. 2 Digital Data Representation.
Representing Data, Pictures, Time, and Size in Computer
Processing Data.
Binary Aim: Explain binary and binary units Objective 1: Convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice versa Objective.
Number Systems & Logic Gates Day 1
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.
Bits and Bytes.
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.
Data and Program Representation
Chapter 2 Computer Hardware
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,
Discovering Computers Fundamentals, 2010 Edition Living in a Digital World Chapter Three.
Binary Code.
Hardware Data Storage.
Data Representation and Storage Lecture 5. Representations A number value can be represented in many ways: 5 Five V IIIII Cinq Hold up my hand.
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!
Computer Systems Nat 4/5 Computing Science Data Representation Lesson 2: Floating Point Representation.
Numerical Representation Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg 1.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
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.
Do it now activity Can you work out what the missing symbols are and work out the order they should be in if the table shows smallest to largest KB kilobyte.
How We Measure Memory. Learning Goal Today we are going to learn how the computer stores information.
GCSE ICT Storing data - Internal memory, backing storage, and measuring memory.
Networking for Home and Small Businesses –.  Explain the binary representation of data.
Data Representation (in computer system). Data Representation How do computers represent data? b The computers are digital Recognize.
How We Measure Memory. At the Bottom of things A piece of digital information is always stored as a sequence of binary states. What’s that mean you ask???
Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.
ASCII AND EBCDIC CODES By : madam aisha.
Problem Solving Intro to Computer Science CS1510 Dr. Sarah Diesburg 1.
Understanding Computers
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
Binary Numbers. Base 10 and Base 2  We normally work with numbers in base 10.  In base 10 we use the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.  Everything.
CC111 Lec#2 The System Unit The System Unit: Processing and Memory Lecture 2 Binary System.
Understanding Binary Understanding Computers. Understanding Computers L3 – Understanding Binary Learning Objectives All will Understand why all data is.
Numerical Representation Intro to Computer Science CS1510 Dr. Sarah Diesburg 1.
1.4 Representation of data in computer systems Character.
© OCR 2016 Unit 2.6 Data Representation Lesson 1 ‒ Numbers.
Binary and Hard Disk PEOPLE Program
The Study of Computer Science Chapter 0
Understanding binary Understanding Computers.
Computer basics.
How Computers Store Variables
3.1 Denary, Binary and Hexadecimal Number Systems
Storage Hardware This icon indicates the slide contains activities created in Flash. These activities are not editable. For more detailed instructions,
Numerical Representation
Memory Parts of a computer
Information Support and Services
What is Binary? Binary is a two-digit (Base-2) numerical system, which computers use to process and store data. The reason computers use the binary system.
The Study of Computer Science Chapter 0
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Denary to Binary Numbers & Binary to Denary
Lecture 3 ISE101: Computing Fundamentals
Data Representation Numbers
The Study of Computer Science
Computers & Programming Languages
Bits, Bytes, and Storage.
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Dr. Clincy Professor of CS
Numerical Representation
The Study of Computer Science
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Binary System.
Information Technology Department
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Computer Systems Nat 4/5 Computing Science Data Representation
The Study of Computer Science Chapter 0
Numerical Representation
Presentation transcript:

Numerical Representation Intro to Computer Science CS1510 Dr. Sarah Diesburg

Announcements No class on Monday Today Review Wednesday’s lecture Start numerical analysis

Review: What does a computer know? Switches! What does a switch represent?? Keep this in mind as you learn the semantics of programming

Visualizing Memory Thus, while we might visualize the computer with all sorts of data in the memory slots… X 75.62 … STO 005 ADD 003 RTV 001 H -26 0.005 354 -27.2 999 998 … 7 6 5 4 3 2 1

Visualizing Memory … It really consists of an arrangement of 1s and 0s

Visualizing Memory So…what does having a 32-bit computer mean? Notice that they are multiples of 8…the byte!

Computer Units The Bit (Binary Digit) – one digit that is either a 1 or a 0 A Byte – 8 bits When we reserve memory for our programs, they will be in multiples of 8 bits

How big is a byte? If a byte is 8 bits, how big is that? How many different numbers are stored in a byte? 28 = 256 possible permutations

Larger Units of Measure 210 bytes = 1024 bytes = 1KB (1 Kilobyte) 210 KB = 1024 KB = 1 MB (1 Megabyte) 210 MB = 1024 MB = 1 GB (1 Gigabyte) 210 GB = 1024 GB = 1 TB (1 Terabyte) Know what comes next? Lets say we have 2MB. How many bytes is that?

But we are still missing something How does the computer translate from groups of 0’s and 1’s to something more meaningful? Binary number system! For today, we will talk about how binary numbers are translated into unsigned integers

Binary Numbers The “switch” nature of transistors make storing numbers in binary a natural fit. Binary is a change of base for our number system, base 2 In a number, its position represents powers of 2

Numeric representation We usually work with decimal numbers with digits from 0 to 9 and powers of 10 7313 = (7 * 1000 + 3 * 100 + 1 * 10 + 3 * 1) Or (7 * 103 + 3 * 102 + 1 * 101 + 3 * 100) The binary number system uses digits 0 and 1 and powers of 2 0101 = (0 * 8 + 1 * 4 + 0 * 2 + 1 * 1) Or (0 * 23 + 1 * 22 + 0 * 21 + 1 *20) = 5 See http://computer.howstuffworks.com/bytes1.htm for more information on number systems and binary numbers.

Thinking about this… A nibble is half a byte 0110 is one example How many numbers can a nibble store? Which numbers can a nibble store? Largest nibble/smallest nibble?

Your turn #1 What unsigned decimal numbers are represented by the following binary numbers? Example: 00000101 = 5 01000100 00001101 10110011

Your turn #2 How would you write the following numbers in binary? Example: 14 = 8 + 4 + 2 -> 00001110 3 121 143

Encoding Binary numbers can represent more things than just integers Another example is ASCII American Standard Code for Information Interchange Character encoding scheme based on the English alphabet http://en.wikipedia.org/wiki/ASCII