Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Slides:



Advertisements
Similar presentations
Computer Science 101 Binary Systems. Humans Decimal Numbers (base 10) Decimal Numbers (base 10) Sign-Magnitude (-324) Sign-Magnitude (-324) Decimal Fractions.
Advertisements

Connecting with Computer Science, 2e
Chapter 3 Data Representation.
Level ISA3: Information Representation
Chapter 3 Data Representation. Chapter goals Describe numbering systems and their use in data representation Compare and contrast various data representation.
2 Systems Architecture, Fifth Edition Chapter Goals Describe numbering systems and their use in data representation Compare and contrast various data.
Data Representation in Computers
Representation and Conversion of Numeric Types 4 We have seen multiple data types that C provides for numbers: int and double 4 What differences are there.
Number Systems Computer Science 210 Computer Organization.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Chapter 5 Data representation.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Simple Data Type Representation and conversion of numbers
Lecture 5.
Computer Arithmetic Nizamettin AYDIN
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
DECIMAL BASE Based on power of 10 In the number 2,468 – from right to left -- the 8 represents the ones, the 6 represents the tens, the 4 represents the.
Computer Math CPS120: Data Representation. Representing Data The computer knows the type of data stored in a particular location from the context in which.
IT253: Computer Organization
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 1. Data Representation Data Representation – Why do we use binary? simplicity,
Shawlands Academy Higher Computing Data Representation.
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
Data Representation.
Representation of data types. Introduction We are going to look at representing cardinal numbers, integers and real numbers in decimal, binary, octal.
Data Representation Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Lecture 5. Topics Sec 1.4 Representing Information as Bit Patterns Representing Text Representing Text Representing Numeric Values Representing Numeric.
Digital Logic Lecture 2 Number Systems
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
CMSC 104, Lecture 051 Binary / Hex Binary and Hex The number systems of Computer Science.
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
How a Computer Processes Information. Java – Numbering Systems OBJECTIVE - Introduction to Numbering Systems and their relation to Computer Problems Review.
THE BINARY NUMBER SYSTEM “There are only 10 types of people in this world: Those who understand BINARY and those who do not.”
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 Systems Denary Base 10 Binary Base 2 Hexadecimal Base 16
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Computer Studies Today Chapter 19 1 Chapter 19. Computer Studies Today Chapter 19 2 »Information stored in a computer is in two states: –ON –OFF.
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
09/06/ Data Representation ASCII, Binary Denary Conversion, Integer & Boolean data types.
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
Fall’ 2014 Lesson - 1 Number System & Program Design CSE 101.
Software Design and Development Storing Data Computing Science.
Fall’ 2014 Number System CSE Number System How Computers Represent Data Binary Numbers The Binary Number System Bits and Bytes Text Codes Binary.
DATA Unit 2 Topic 2. Different Types of Data ASCII code: ASCII - The American Standard Code for Information Interchange is a standard seven-bit code that.
Lesson Objectives Aims You should know about: Binary numbers ‘n’ that.
Nat 4/5 Computing Science Data Representation Lesson 3: Storing Text
Chapter 3 Data Representation
Computer Science 210 Computer Organization
Binary and Hard Disk PEOPLE Program
Chapter 8 & 11: Representing Information Digitally
CSCI 198: Lecture 4: Data Representation
Chapter 3 Data Storage.
EPSII 59:006 Spring 2004.
Why use Binary? There are only four rules for addition in binary compared to 100 in decimal [0+0=0 ; 0+1=1 ; 1+0=1; 1+1=10]
Data Storage Introduction to computer, 2nd semester, 2010/2011
Computer Science 210 Computer Organization
Presenting information as bit patterns
Why use Binary? It is a two state system (on/off) which makes it simple to operate Even if degradation of current occurs (ie a slight drop in voltage)
Plan Attendance Files Posted on Campus Cruiser Homework Reminder
Storing Negative Integers
How Computers Store Data
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Computer Organization
Data Representation and Organization
Chapter Four Data Representation in Computers By Bezawit E.
Presentation transcript:

Data as the computer sees it 1

 Number systems Number systems  Data storage Data storage  Glossary Glossary 2

Because of their electronics, computers work with only two states – on or off, that is a binary or base 2 number system 3

Base 10 (Decimal) Base 2 (Binary)Base 16 (Hexadecimal) A2CD3E 16 4

Decimal number (base 10): Number Placeholde r column Place value/ Written as base Place value /10 =0,1 1/100 =0,01 1/1000 =0,001 Expanded notation =4 X X X X X X X10 -3 = =

Binary number (base 2):

Hexadecimal numbers (base 16) 7

 Engineers discovered that it was easy, from a ‘physical’, engineering point of view, to have just two states – on or off.  This could easily be represented by the presence or absence of current flow.  Hence at the lowest level, data is represented in binary, to make it easier to design and build hardware. 8

Convert binary numbers to decimal numbers = (1 x 2 3 ) + (0 x 2 2 ) + (0 x 2 1 ) + (1 x 2 0 ) = (1 x 8) + (0 x 4) + (0 x 2) + (1 x 1) = = 9 9

Convert the following binary numbers to decimal numbers, showing all your calculations. 10

Convert hexadecimal to decimal number 2F3 16 = (2 x 16 2 ) + (F x 16 1 ) + (3 x 16 0 ) = (2 x 256) + (15 x 16) + (3 x 1) = =

Convert the following hexadecimal numbers to decimal, showing all your calculations. 12

This is good old primary school division with the remainder! 13

Convert the following decimal numbers to binary numbers. 14

634÷ 16 = 39remainder 10 39÷ 16 = 2remainder 7 2÷ 16 = 0remainder 2 answer is 27A 16 (10 = A) 15

Write the following decimal numbers in hexadecimal notation. 16

 Each of these data types is allocated a fixed number of what is termed bytes.  Each byte (a number in binary format e.g ) in turn, consists of 8 binary digits or bits.  Here is an example of data stored in 4 bytes of 8 bits each, i.e. 32 bits. 17

 Each data type is allocated a fixed amount of space (bytes) to store its associated data  There is therefore a limit on the data that can be stored –more bytes - larger the range and fewer bytes - smaller the range. Common data types: Integer or whole number Real or decimal or floating point String or text 18

19

 A text or string variable that could store a maximum of 5 characters and was assigned the value ‘Addendum’ to the variable.  Some of the text can be ‘lost’.  We refer to the situation where an integer number is ‘misrepresented’ due to an insufficient number of bits being available, as overflow. Adden 20

 Each program/programming language uses different numbers of bytes to store numbers  Decimal or real numbers are normally stored in two parts, namely a ‘number’ part and an ‘exponent’ part e.g x  Obviously, a loss of accuracy in the exponent part would be critical !  A loss of accuracy in the number part would lead to a loss of accuracy in the number of decimals 21

 Coding schemes  The ASCII system was the original standard which assigned numeric values to letters, digits, punctuation marks, and other characters 22

 Pictures and sound clips  Picture is a collection of thousands of dots, each of which can be modelled by representing its position and colour etc.,then we can digitise any picture or video  Music too can be modelled by representing the data as numerical values describing volume, pitch and frequency 23

Know the basics 24

Apply your knowledge 25

Think and research 26

ASCIIBinaryBitByte Coding scheme Decimal Hexadecimal Octal Overflow Primitive data type Truncation 27