CS 111 – Sept. 1 Intro to data representation Binary numbers –Convert binary  decimal –Convert decimal  binary Text –ASCII and Unicode Commitment: –For.

Slides:



Advertisements
Similar presentations
Number Systems and Codes
Advertisements

A-Level Computing#BristolMet Session Objectives#8 express numbers in binary, octal and hexadecimal explain the use of code to represent a character set.
CS 61C L02 Number Representation (1)Harvey / Wawrzynek Fall 2003 © UCB 8/27/2003  Brian Harvey ( John Wawrzynek  (Warznek) (
How Computers Represent Numbers Friday, Week 5. Binary Code A series of 1’s and 0’s Place value is in powers of 2.
Text Representation within Computers CS208. The Binary Digit (Bit) One bit can encode a value set that contains two elements e.g. {black, white}, {up,
Binary Expression Numbers & Text CS 105 Binary Representation At the fundamental hardware level, a modern computer can only distinguish between two values,
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
IT-101 Section 001 Lecture #4 Introduction to Information Technology.
Representing Information in Binary (Continued)
CHARACTERS Data Representation. Using binary to represent characters Computers can only process binary numbers (1’s and 0’s) so a system was developed.
Hexadecimal and ASCII Lesson Objective: Understand the purpose of ASCII and how to use it. Lesson Outcome: Convert between Hexadecimal and ASCII Convert.
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.
Data vs. Information OUTPUTOUTPUT Information Data PROCESSPROCESS INPUTINPUT There are 10 types of people in this world those who read binary and those.
COMT 222 Tools for a Digital World. Digital? What makes information Digital? If it helps:  When is information not analog? Answer:  A finite number.
Abstraction – Number Systems and Data Representation.
Chapter 3 Representing Numbers and Text in Binary Information Technology in Theory By Pelin Aksoy and Laura DeNardis.
Binary Numbers and ASCII and EDCDIC Mrs. Cueni. Data Representation  Human speech is analog because it uses continuous signals (waves) that vary in strength.
Computer System Basics 1 Number Systems & Text Representation Computer Forensics BACS 371.
Working with text ASCII and UNICODE.   
Chapter 2 Computer Hardware
Data Representation CS280 – 09/13/05. Binary (from a Hacker’s dictionary) A base-2 numbering system with only two digits, 0 and 1, which is perfectly.
Computers and Text Daniel Velasquez Scott Baranick.
Binary Code.
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.
Binary, Decimal and Hexadecimal Numbers Svetlin Nakov Telerik Corporation
Numerical Representation Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg 1.
Section 3.1: Number Representation Practice HW (not to hand in) From Barr Text p. 185 # 1-5.
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
Representing Characters in a computer Pressing a key on the computer a code is generated that the computer can convert into a symbol for displaying or.
CS 101 – Aug. 31 Interpreting binary  decimal √ Decimal  binary Shorthand ways of expressing binary –Octal –“Hex” Negative numbers.
THE BINARY NUMBER SYSTEM “There are only 10 types of people in this world: Those who understand BINARY and those who do not.”
CS 111 – Sept. 3 More data representation Review hex notation Text –ASCII and Unicode Sound and images Commitment: –For Wednesday: Please read pp
Decimal to Binary Conversion Press any key to continue…
Binary 101 Gads Hill School. Aim To strengthen understanding of how computers use the binary number system to store information.
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.
CS 101 – Sept. 11 Review linear vs. non-linear representations. Text representation Compression techniques Image representation –grayscale –File size issues.
Lesson 6 Binary Understand what Binary Code means and apply this knowledge Understand how data is represented using bit systems and be able to change decimal.
Understanding Computers
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
Base 16 (hexadecimal) Uses the decimal digits and the first letters of the alphabet to encode 4 binary bits (16=2 4 ) abcdef or ABCDEF.
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.
Nat 4/5 Computing Science Data Representation Lesson 3: Storing Text
Binary Representation in Text
Binary Representation in Text
Understanding binary Understanding Computers.
Binary 1 Basic conversions.
Binary Numbers and ASCII and EDCDIC
Unit 18: Computational Thinking
CSCI 198: Lecture 4: Data Representation
Numerical Representation
CSCI 161: Lecture 4: Data Representation
Binary, Decimal and Hexadecimal Numbers
Data Encoding Characters.
Numerical Representation
Information Representation
Fundamentals of Data Representation
Presenting information as bit patterns
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
How Computers Store Data
Numerical Representation
Learning Intention I will learn how computers store text.
Electronic Memory.
Understanding the Number Decimal to Binary Conversion
Chapter 3 - Binary Numbering System
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
Digital Representation of Data
Numerical Representation
Presentation transcript:

CS 111 – Sept. 1 Intro to data representation Binary numbers –Convert binary  decimal –Convert decimal  binary Text –ASCII and Unicode Commitment: –For lab: Be sure you understand number conversions –For Friday: Please finish reading sections 1.4 and 1.5

Numbers in binary Place value system just like decimal –We understand 278 = (2 * 100) + (7 * 10) + (8 * 1) In a binary number: –Each digit is either a 0 or 1 –Digits are multiplied by powers of 2, not powers of 10. For example, and : 32 *16 *8 *4 *2 *1 *Value

Powers of = = = = = 16 … 2 10 ~ 1 thousand 2 20 ~ 1 million 2 30 ~ 1 billion Let’s say we have 4 bits. –What is the lowest # ? –What is the highest # ? What if we had 5 bits? Is there a pattern?

Decimal  binary One thing to note is that binary numbers are “longer” than decimal. –A 5-digit decimal number may turn out to be 15 bits long. My technique is the “binary store” –All merchandise is priced $1, $2, $4, $8, $16, … –You enter store with some money, say $45. –Goal is to always buy most expensive gift possible. –So, 45 = *16 *8 *4 *2 *1 *

Another example Convert 61 to binary: Go to binary store with $61… 61 = Another way to write this is: 61 = Our binary answer is

Numbers in a byte A byte is 8 bits So, how big can an 8-bit binary number be? Hexidecimal shorthand –8/4 = 2 hexidecimal digits per byte –What do the letters ‘a’ – ‘f’ mean? a = 10, b = 11, c = 12, d = 13, e = 14, f = 15 –Example: = 5e in hex. –Try this one: = ______ in hex. –Try this one: a4c in hex = ________ in binary.

Text Fundamental unit is the character. Each character of a text document is given a numerical code. ASCII code –Contiguous (make it easy to alphabetize) –Case sensitive –One byte per character ASCII table (p. 597) –‘A’ = 65‘a’ = 97‘0’ = 48 –Try encoding the word: “Dog”

Unicode To support foreign alphabet and misc. symbols. Extension of ASCII 16 bits per character, rather than 8 unicode.org has code charts Codes are given in hex.