Binary Representation in Text

Slides:



Advertisements
Similar presentations
Technology ICT Option: Data Representation. Data Representation In our everyday lives, we communicate with each other using analogue data. This data takes.
Advertisements

Review of HTML Ch. 1.
Review Ch.1,Ch.4,Ch.7. Review of tags covered various header tags Img tag Style, attributes and values alt.
How Computers Represent Numbers Friday, Week 5. Binary Code A series of 1’s and 0’s Place value is in powers of 2.
Chapter 8_2 Bits and the "Why" of Bytes: Representing Information Digitally.
Data Representation in Computers
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
COMPUTER FUNDAMENTALS David Samuel Bhatti
2.1.4 BINARY ASCII CHARACTER SETS A451: COMPUTER SYSTEMS AND PROGRAMMING.
Computer Systems Nat 4/5 Computing Science Data Representation Lesson 3: Storing Text.
Decisions in Python Comparing Strings – ASCII History.
CHARACTERS Data Representation. Using binary to represent characters Computers can only process binary numbers (1’s and 0’s) so a system was developed.
Dale & Lewis Chapter 3 Data Representation
RAM and Binary Numbers RAM and Binary Numbers What is ? What is 52 in binary? What is a file? Preview Questions:
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Faculty: Anita Kanavalli Department of CSE M S Ramaiah Institute of Technology Bangalore E mail-
©Brooks/Cole, 2003 Chapter 2 Data Representation.
Chapter 2 Data Representation. Define data types. Visualize how data are stored inside a computer. Understand the differences between text, numbers, images,
Data vs. Information OUTPUTOUTPUT Information Data PROCESSPROCESS INPUTINPUT There are 10 types of people in this world those who read binary and those.
1 CSC103: Introduction to Computer and Programming Lecture No 2.
ASCII and Unicode.
Representing text Each of different symbol on the text (alphabet letter) is assigned a unique bit patterns the text is then representing as.
Computer System Basics 1 Number Systems & Text Representation Computer Forensics BACS 371.
CPS120: Introduction to Computer Science
Chapter 2 Computer Hardware
1 INFORMATION IN DIGITAL DEVICES. 2 Digital Devices Most computers today are composed of digital devices. –Process electrical signals. –Can only have.
Bits & Bytes Created by Chris McAbee For AAMU AGB199 Extra Credit Created from information copied and pasted from
Computer System Basics 1 Number Systems & Text Representation Computer Forensics BACS 371.
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.
Data Representation, Number Systems and Base Conversions
Data Representation (in computer system). Data Representation How do computers represent data? b The computers are digital Recognize.
Data Representation. What is data? Data is information that has been translated into a form that is more convenient to process As information take different.
M204 - Data Representation
ASCII AND EBCDIC CODES By : madam aisha.
A+ Computer Repair Lesson 3: Number System. Objectives Define binary, decimal, octal, and hexadecimal numbering systems. Define binary, decimal, octal,
Understanding Computers
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
Data Representation. In our everyday lives, we communicate with each other using analogue data. This data takes the form of: Sound Images Letters Numbers.
Understanding Binary Understanding Computers. Understanding Computers L3 – Understanding Binary Learning Objectives All will Understand why all data is.
1.4 Representation of data in computer systems Character.
Nat 4/5 Computing Science Data Representation Lesson 3: Storing Text
DATA REPRESENTATION - TEXT
Some basic concepts underlying computer archi­tecture
Binary Representation in Text
Understanding binary Understanding Computers.
Unit 2.6 Data Representation Lesson 2 ‒ Characters
3 – Boolean Logic and Logic Gates 4 – Binary Numbers
Chapter 3 Data Representation Text Characters
Binary Numbers and ASCII and EDCDIC
CSCI 198: Lecture 4: Data Representation
Chapter 3 Data Storage.
CSCI 161: Lecture 4: Data Representation
Digital Electronics Jess 2008.
Information Support and Services
Representing Characters
Chapter 1 Data Storage.
Ch2: Data Representation
Presenting information as bit patterns
COMS 161 Introduction to Computing
Number Systems Lecture 2.
COMS 161 Introduction to Computing
Learning Intention I will learn how computers store text.
Option: Data Representation
Option: Data Representation
WJEC GCSE Computer Science
ASCII LP1.
Chapter 3 - Binary Numbering System
ENEL 111 Digital Electronics
Digital Representation of Data
ASCII and Unicode.
Presentation transcript:

Binary Representation in Text

Why is it important to know how to convert between Hex, Dec, Binary? Binary and hexadecimal are useful because it turned out that it was more practical to construct complex machinery that uses digital electronics rather than analog electronics. Octal numbering is also used, but it is not as useful for our purpose as Binary, Hexadecimal and Decimal systems. In the context of electronics, it means a current or voltage is used to turn on, or turn off a “switch.” Thus it is practical for the on/off values to be just two -- on or off. Thus the easiest way for our electronics to work in terms of “bits”, or binary digits.

Why is it important to know how to convert between Hex, Dec, Binary? The other numbering systems (hexadecimal and octal) became useful as a result. Binary numbers are a pain for humans to deal with because they get large, in terms of number of digits quickly. Example, 111000110011100100110010000000111010001 111110010 …and humans don’t like numbers with lots of digits.

Why is it important to know how to convert between Hex, Dec, Binary? To make things easier for ourselves, it makes sense to group raw binary code and treat these groups as a single digit. Each digit in the hexadecimal system is equivalent to a four-digit binary numbers. Example: f (in hexadecimal) = 1111 (binary code)

ASCII ASCII is an acronym for the American Standard Code for Information Interchange. It is a standard seven-bit code that was first proposed by the American National Standards Institute or ANSI in 1963, and finalized in 1968 as ANSI Standard X3.4. The purpose of ASCII was to provide a standard to code various symbols both visible (letters, numbers, punctuation) and invisible symbols (space bar, enter tab, shift, control etc…).

ASCII In the ASCII character set, each binary value between 0 and 127 represents a specific character. Most computers extend the ASCII character set to use the full range of 256 characters available in a byte. The upper 128 characters handle special things like accented characters from common foreign languages.

ASCII In general, ASCII works by assigning standard numeric values (decimal) to letters, numbers, punctuation marks and other characters such as control codes. An uppercase "A," for example, is represented by the decimal number 65."

Bytes and ASCII By looking at the ASCII table, you can clearly see a one- to-one correspondence between each character and the ASCII code used. For example, 32 is the ASCII code for a space. We could expand these decimal numbers out to binary numbers where 32 = 00100000, if we wanted to be technically correct -- that is how the computer really deals with things.

Bytes and ASCII Computers store text documents, both on disk and in memory, using these ASCII codes. For example, if you use Microsoft Word in Windows XP/2000 to create a text file containing the words, “Friends, Romans, Countrymen” Word would use 1 byte (8 bits) of memory per character (including 1 byte for each space character between the words) In this example, the total would be - 27 characters. When Word stores the sentence in a file on disk, the file will also contain 1 byte per character and per space.

Bytes and ASCII If you were to look at the file as a computer looks at it, you would find that each byte contains not a letter but a number -- the number is the ASCII code (decimal) corresponding to the character. So on disk, the numbers for the file look like this: Text - Friends, Roman, Countrymen Decimal Format - 70 114 105 101 110 100 115 44 32 82 111 109 97 110 115 44 32 67 111 117 110 116 114 121 109 101 110 Binary Format - 01000110 01110010 01101001 01100101 01101110 01100100 01110011 00101100 00100000 01010010 01101111 01101101 01100001 01101110 00101100 00100000 01000011 01101111 01110101 01101110 01110100 01110010 01111001 01101101 01100101 01101110

Bytes and ASCII Externally, it appears that human beings will use natural languages symbols to communicate with computer – English, French, Arabic, Spanish and etc… But a computer will convert the decimal, or hexadecimal, code into binary data and then process all information in binary world. Finally, computer will convert binary information back to decimal, or hexadecimal, code which is then converted into symbols and characters understandable to human beings.

Bytes and ASCII When you type the letter A, the hardware logic built into the keyboard automatically translates that character into the ASCII code 65 (decimal value). This is then sent to the computer and read in binary (0100 0001). Similarly, the computer takes the binary code and sends the ASCII code 65 (decimal value) to output devices, the output hardware interprets the code and draws the letter “A” on your screen of your computer. As such, this is how binary code is used to create text on a computer. Input - A 65 0100 0001 Output - 0100 0001  65 A

Layered View of Representation Input sequence below Output sequence below Text string Information Data A great diagram to copy. Sequence of characters Information Data Character Bit string

Unicode - representation ASCII code can represent 8 bits information only 128 = 27 characters. It only represents the English Alphabet plus some control characters. Unicode is designed to represent the worldwide interchange by recognizing more than one language. It uses 16 bits and can represents 32,768 = 215 characters.

ASCII Assignment Using ASCII you are to write the following messages: Your name Write a sentence for a friend to decode in class Convert both your name and your message to binary code For a challenge convert your messages into hexadecimal.