D ATA REPRESENTATION, BINARY SYSTEM, B IT, B YTE, ASCII C ODE Chapter 4 Lecturer In Charge: Manesh T 1.

Slides:



Advertisements
Similar presentations
Number Systems Digital Logic By: Safwan Mawlood
Advertisements

CIS 020 Assembly Programming Chapter 02 - Numbering Systems & Data Representation © John Urrutia 2012, All Rights Reserved.5/27/20121.
Number SystemsNumber Systems Modified By: AM. Sihan (Hardware Engineering)
How Computers Represent Numbers Friday, Week 5. Binary Code A series of 1’s and 0’s Place value is in powers of 2.
How Computers Represent Numbers Friday, Week 5. Binary Code A series of 1’s and 0’s Place value is in powers of 2.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
Representation of Data How is data (numbers, characters) represented so that it can be used in a Computer ?
Data Representation in Computers
ITEC 1011 Introduction to Information Technologies 1. Number Systems Chapt. 2 Location in course textbook.
Prepared By Rama Gaikwad 1. Number Systems. Common Number Systems SystemBaseSymbols Used by humans? Used in computers? Decimal100, 1, … 9YesNo Binary20,
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.
Computer System Basics 1 Number Systems & Text Representation Computer Forensics BACS 371.
Lecture 7 How computers process data (Number Systems) PRESENTED BY MD. MAHBUBUL ALAM, PHD 1.
Fundamentals of IT UNIT-I OnlyforIPMCA. DIGITAL SIGNALS & LOGIC GATES Signals and data are classified as analog or digital. Analog refers to something.
Introduction to Computer Science Number Systems. Introduction to Computer Science Common Number Systems SystemBaseSymbols Used by humans? Used in computers?
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
Computer Structure & Architecture 7c - Data Representation.
D ATA REPRESENTATION, BINARY SYSTEM, B IT, B YTE, ASCII C ODE Chapter 3 Mr.Mohammed Rahmath.
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
1.7 BINARY CODES BCD Code (Binary –Coded Decimal ) BCD Addition
Conversion of Number System Conversion Among Bases The possibilities: Hexadecimal DecimalOctal Binary
NUMBER SYSTEMS Prepared By K.Anitha Associate Professor Dept of ECE PVPSIT.
Chapter1: Number Systems
Number Systems Prepared by Department of Preparatory year.
Chapter 2 Data Representation.
Number System sneha.
Octal to Decimal Hexadecimal DecimalOctal Binary.
MicroProcessors Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty of Engineering Zagazig University.
L EARN TO C OUNT IN B INARY CALLED “M ACHINE L ANGUAGE ” T HE L ANGUAGE OF THE C OMPUTER …. Now you will become a real “bit head” or “computer nerd” 0’s.
1. Number Systems. Common Number Systems SystemBaseSymbols Used by humans? Used in computers? Decimal100, 1, … 9YesNo Binary20, 1NoYes Octal80, 1, … 7No.
Codes Octal Power Hexadecimal ASCII BCD Code
Data Representation (in computer system). Data Representation How do computers represent data? b The computers are digital Recognize.
Number Systems. Common Number Systems SystemBaseSymbols Used by humans? Used in computers? Decimal100, 1, … 9YesNo Binary20, 1NoYes Octal80, 1, … 7No.
Computer Programming 12 Mr. Jean February 11 th, 2014.
Lecture 2 Number Systems
D IGITAL C IRCUITS Book Title: Digital Design Edition: Fourth Author: M. Morris Mano 1.
Computer Number System
Programming 12 : Mr. Jean February 8 th, The plan: Video clip of the day Website Introduction to Hexadecimal Converting from Hexadecimal to Decimal.
1. Number Systems Chapt. 2 Location in course textbook.
ITEC 1011 Introduction to Information Technologies 1. Number Systems Chapt. 2 Location in course textbook.
Prepared By: Md Rezaul Huda Reza University of South Asia Computer Architecture By: Md Rezaul Huda Reza
1. Number Systems. Common Number Systems SystemBaseSymbols Used by humans? Used in computers? Decimal100, 1, … 9YesNo Binary20, 1NoYes Octal80, 1, … 7No.
Cis303a_chapt03_exam1_answer.ppt CIS303A: System Architecture Exam 1: Chapter 3 Answer List the characters (digits) for the following bases. 1) Decimal:
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
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. ASCII – American Standard Code for Information Interchange – Standard encoding scheme used to represent characters in binary format on.
Number Systems. There are 10 kinds of people in the world, those who understand binary and those who don’t.
1. Number Systems Chapt. 2. Common Number Systems SystemBaseSymbols Used by humans? Used in computers? Decimal100, 1, … 9YesNo Binary20, 1NoYes Octal80,
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
Some basic concepts underlying computer archi­tecture
Number Systems and Codes
Octal to Decimal Decimal Octal Binary Hexadecimal.
1. Number Systems.
NUMBER SYSTEM Prepared by: Engr Zakria.
Number System.
CSCI 198: Lecture 4: Data Representation
CSCI 161: Lecture 4: Data Representation
Location in course textbook
Chapter 1 Number Systems & Conversions
Number Systems and Codes
1. Number Systems.
Numbering System TODAY AND TOMORROW 11th Edition
Numbering Systems and Arithmetic operations on Hex, binary, and octal
Number Systems.
Number Systems created by: S.Shahrukh haider
Learning Intention I will learn how computers store text.
Chapter 2 Number System.
1. Number Systems Chapt. 2.
Presentation transcript:

D ATA REPRESENTATION, BINARY SYSTEM, B IT, B YTE, ASCII C ODE Chapter 4 Lecturer In Charge: Manesh T 1

D ATA R EPRESENTATION Data Representation refers to how Computers store lots of different types of information: numbers text graphics of many varieties (stills, video, animation) sound 2

M EMORY S TRUCTURE IN C OMPUTER Memory consists of bits (0 or 1) – a single bit can represent two pieces of information bytes (=8 bits) – a single byte can represent 256 = 2x2x2x2x2x2x2x2 = 2 8 pieces of information words (=2,4, or 8 bytes) – a 2 byte word can represent pieces of information (approximately 65 thousand). Byte addressable - each byte has its own address. 3

B INARY SYSTEM 4

C LASSIFICATIONS 5

S TORAGE U NITS 6

N UMBER S YSTEMS Binary (2)Decimal (10)Octal (8) Hexadecimal (16) 0000' ' ' ' ' ' '66'6' 0111' '8 1001'9 1010'10 A 1011'11 B 1100'12 C 1101'13 D 1110'14 E 1111'15 F 7

C ONVERSION A MONG B ASES The possibilities: Hexadecimal DecimalOctal Binary pp

Q UICK E XAMPLE = = 31 8 = Base 9

D ECIMAL TO D ECIMAL ( JUST FOR FUN ) Hexadecimal DecimalOctal Binary Next slide… 10

=>5 x 10 0 = 5 2 x 10 1 = 20 1 x 10 2 = Base Weight 11

B INARY TO D ECIMAL Hexadecimal DecimalOctal Binary 12

B INARY TO D ECIMAL Technique Multiply each bit by 2 n, where n is the “weight” of the bit The weight is the position of the bit, starting from 0 on the right Add the results 13

E XAMPLE => 1 x 2 0 = 1 1 x 2 1 = 2 0 x 2 2 = 0 1 x 2 3 = 8 0 x 2 4 = 0 1 x 2 5 = Bit “0” 14

O CTAL TO D ECIMAL Hexadecimal DecimalOctal Binary 15

O CTAL TO D ECIMAL Technique Multiply each bit by 8 n, where n is the “weight” of the bit The weight is the position of the bit, starting from 0 on the right Add the results 16

E XAMPLE => 4 x 8 0 = 4 2 x 8 1 = 16 7 x 8 2 =

H EXADECIMAL TO D ECIMAL Hexadecimal DecimalOctal Binary 18

H EXADECIMAL TO D ECIMAL Technique Multiply each bit by 16 n, where n is the “weight” of the bit The weight is the position of the bit, starting from 0 on the right Add the results 19

E XAMPLE ABC 16 =>C x 16 0 = 12 x 1 = 12 B x 16 1 = 11 x 16 = 176 A x 16 2 = 10 x 256 =

D ECIMAL TO B INARY Hexadecimal DecimalOctal Binary 21

D ECIMAL TO B INARY Technique Divide by two, keep track of the remainder First remainder is bit 0 (LSB, least-significant bit) Second remainder is bit 1 Etc. 22

E XAMPLE = ? =

O CTAL TO B INARY Hexadecimal DecimalOctal Binary 24

O CTAL TO B INARY Technique Convert each octal digit to a 3-bit equivalent binary representation 25

E XAMPLE = ? =

H EXADECIMAL TO B INARY Hexadecimal DecimalOctal Binary 27

H EXADECIMAL TO B INARY Technique Convert each hexadecimal digit to a 4-bit equivalent binary representation 28

E XAMPLE 10AF 16 = ? A F AF 16 =

C LASS WORK Convert Decimal to Binary 1. (421) 10 = ( ) 2 2. (1025) 10 = ( ) 2 3. (368) 10 = ( ) 2 4. (687) 10 = ( ) 2 5. (625) 10 = ( ) 2 6. (752) 10 = ( ) 2 30

C LASS WORK Convert Binary to Hexadecimal 1. ( ) 2 = ( ) ( ) 2 = ( ) ( ) 2 = ( ) ( ) 2 = ( ) ( ) 2 = ( ) ( ) 2 = ( ) 16 31

C LASS WORK Convert Hexadecimal to Binary 1. (AF1) 16 = ( ) 2 2. (924) 16 = ( ) 2 3. (3569) 16 = ( ) 2 4. (4526) 16 = ( ) 2 5. (6548) 16 = ( ) 2 6. (1334) 16 = ( ) 2 32

ASCII The most common code used in computers is ASCII (American Standard Code for Information Interchange). ASCII provides codes for letters, digits, punctuation marks, and other special characters. The ASCII code for A is 65 =

ASCII C ODES Sp!“#$%&‘()*+, / :; JKLMNOPQRSTUVW XYZ[\]^_`abcde fghijklmnopqrs tuvw xyz{|}~

ASCII REPRESENTATION OF T EXT Since the ASCII codes for ART are 65, 82, and 84, the three bytes representing the word ART would be Nearly all software which deals with text (Notepad, WordPerfect, Word) use the ASCII codes to represent such text, though they may use proprietary codes to deal with fonts, etc. 35

C HAPTER 4 E ND 36