Coding of Information Assign a unique string of binary digits to each piece of information There are many standard coding groups –Decimal Codes (BCD –

Slides:



Advertisements
Similar presentations
Computer Codes Rohit Khokher. Computer Codes Data types NumericNonnumeric IntegerRealAlphabet A, B, C, …,Z a, b, c,…,z Digits 0,…,9 Special Characters.
Advertisements

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 Representation
Number Systems Decimal (Base 10) Binary (Base 2) Hexadecimal (Base 16)
Overview Digital Systems and Computer Systems Number Systems [binary, octal and hexadecimal] Arithmetic Operations Base Conversion Decimal Codes [BCD (binary.
EECC341 - Shaaban #1 Lec # 3 Winter Binary Multiplication Multiplication is achieved by adding a list of shifted multiplicands according.
Data Representation in Computers
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
S. Barua – CPSC 240 CHAPTER 2 BITS, DATA TYPES, & OPERATIONS Topics to be covered are Number systems.
Data Representation 3 This week – Recap on Floating point number – ASCII – unicode.
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
CODING SYSTEMS CODING SYSTEMS CODING SYSTEMS. CHARACTERS CHARACTERS digits: 0 – 9 (numeric characters) letters: alphabetic characters punctuation marks:
9/15/09 - L3 CodesCopyright Joanne DeGroat, ECE, OSU1 Codes.
BR 8/99 Digital Devices Integrated Circuits that operate on Digital Data are in 95% of every electrical powered device in the U.S. The theory of operation.
1 herbert van de sompel CS 502 Computing Methods for Digital Libraries Cornell University – Computer Science Herbert Van de Sompel
Chapter 3 Representing Numbers and Text in Binary Information Technology in Theory By Pelin Aksoy and Laura DeNardis.
Representing text Each of different symbol on the text (alphabet letter) is assigned a unique bit patterns the text is then representing as.
Numbers and Number Systems
Binary Codes Computers and other digital systems "work" with binary numbers. I/P & O/P is usually done using decimal numbers, alphabetics, special symbols.
Binary Arithmetic & Data representation
Computer Structure & Architecture 7c - Data Representation.
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Number Systems Part 4 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
The Digital Codes.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Idea 1: Bits Two states in a digital machine: 1.presence of.
ICT Foundation 1 Copyright © 2010, IT Gatekeeper Project – Ohiwa Lab. All rights reserved. Character representation.
Number Systems Spring Semester 2013Programming and Data Structure1.
Introduction to Computer Design CMPT 150 Section: D Ch. 1 Digital Computers and Information CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU 1.
1 INFORMATION IN DIGITAL DEVICES. 2 Digital Devices Most computers today are composed of digital devices. –Process electrical signals. –Can only have.
CS151 Introduction to Digital Design
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
Computer System Architecture © Korea Univ. of Tech. & Edu. Dept. of Info. & Comm. Chap. 2 Number Systems and Codes Binary to Decimal Conversions.
Chapter 2 Bits, Data Types, and Operations. 2-2 Hexadecimal Notation It is often convenient to write binary (base-2) numbers as hexadecimal (base-16)
Logical Circuit Design Week 2,3: Fundamental Concepts in Computer Science, Binary Logic, Number Systems Mentor Hamiti, MSc Office: ,
Summer 2012ETE Digital Electronics1 Binary Arithmetic of Signed Binary Numbers.
ECE 2110: Introduction to Digital Systems BCD, Gray, Character, Action/Event, Serial Data.
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
Number Systems and Digital Codes
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.
Data Representation, Number Systems and Base Conversions
The character data type char. Character type char is used to represent alpha-numerical information (characters) inside the computer uses 2 bytes of memory.
Signed Binary Numbers Arithmetic Subtraction – In 2’s-complement form: Example: 1.Take the 2’s complement of the subtrahend (including the sign bit) and.
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.
Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  The necessity and advantages of coding  The variety of coding systems You will learn: 2.
Module –I Codes: Weighted and non-weighted codes
M204 - Data Representation
DATA REPRESENTATION 4 Y. Colette Lemard February 2009.
ASCII AND EBCDIC CODES By : madam aisha.
Information Coding Schemes Group Member : Yvonne Tiffany Jurifah bt Junaidi Clara Jane George.
ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
Digital Logic & Design Adil Waheed Lecture 03. Range of Binary Numbers Processors can handle 64-bit unsigned binary values. Maximum unsigned decimal number.
Ch2 Number systems and codes
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Logic and Computer Design Fundamentals
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
1.4 Representation of data in computer systems Character.
Binary Representation in Text
Binary Representation in Text
Number Systems and Codes
ECE 2110: Introduction to Digital Systems
Number Representation
CSCI 198: Lecture 4: Data Representation
CSCI 161: Lecture 4: Data Representation
Digital Devices Integrated Circuits that operate on Digital Data are in 95% of every electrical powered device in the U.S. The theory of operation of these.
Computers & Programming Languages
Presenting information as bit patterns
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
Chapter 3 - Binary Numbering System
ASCII and Unicode.
Presentation transcript:

Coding of Information Assign a unique string of binary digits to each piece of information There are many standard coding groups –Decimal Codes (BCD – Binary Coded Decimal) Ways to encode the first 10 symbols of the decimal number system. –Unit-Distance Codes Only one bit changes between succesive values –Alphanumeric Codes Ways to encode characters and numeric data

BCD Codes To represent the first 10 digits in decimal (0-9), how many bits are needed? –With 3 bits, there are 8 different combinations –With 4 bits, there are 16 different combinations Since only 10 different combinations are needed, use 4 bits – 6 combinations will not be used.

Weighted Decimal Codes Decimal Digit8421 Code2421 Code5421 Code7536’ Code

BCD Codes (Decimal Codes) Weighted Code –8421 code Most common Default The corresponding decimal digit is determined by adding the weights associated with the 1s in the code group. **** The BCD representation is NOT the binary equivalent of the decimal number ***** – = –2421, 5421,7536, etc… codes The weights associated with the bits in each code group are given by the name of the code

BCD Codes (Decimal Codes) Nonweighted Codes –2-out-of-5 Actually weighted except for the digit 0 Used by the post office for scanning bar codes for zip codes Has error detection properties

Unit Distance Codes Important when an analog quantity must be converted to a digital representation. Only one bit changes between two successive integers which are being coded.

Unit-Distance Codes (Gray Code) Decimal DigitGray Code Decimal DigitGray Code

Alphanumeric Codes Codes to handle alphabetic and numeric information, special symbols, punctuation marks, and control characters. ASCII (American Standard Code for Information Interchange) is the best known. Unicode – a 16-bit coding system provides for foreign languages, mathematical symbols, geometrical shapes, dingbats, etc…

b6b5b4b6b5b4 b3b2b1b0b3b2b1b SOHDC1!1AQaq 0010STXDC2"2BRbr 0011ETXDC3#3CScs 0100EOTDC4$4DTdt 0101ENQNAK%5EUeu 0110ACKSYN&6FVfv 0111BELETB‘ 7GWgw 1000BSCAN(8HXhx 1001HTEM)9IYiy 1010LFSUB*:JZjz 1011VTESC,;K[k{ 1100FFFS,<L\l| 1101CRGS- M]m} 1110SORS. >N^n~ 1111SIUS/ ?O_oDEL ASCII Code

UNICODE UNICODE is a 16-bit code for representing alphanumeric data. With 16 bits, can represent 2 16 or different symbols. 16 bits = 2 Bytes per character. $ A A-Z $ A a-z Some other alphabet/symbol ranges $3400-3d2d Korean Hangul Symbols $ F Hiranga, Katakana, Bopomofo, Hangul $4E00-9FFF Han (Chinese, Japenese, Korean) UNICODE used by Web browsers, Java, most software these days.BR 2/00

Error Detection and Error Correction Codes

How Much Memory? Memory is purchased in bits – –How many bits do I need if I want to distinguish between 8 colors? –How many bits do I need if I want to represent 16 million different colors?

How Much Memory? How many bits do I need if I want to distinguish between 8 colors? 2 x-1 < 8 <= 2 x x = 3 (3 bits are needed) How many bits do I need if I want to represent 16 million different colors? 2 x-1 < 16 million <= 2 x 16M = 1Mx16 = 2 20 x2 4 = 2 24 x = 24 (24 bits are needed)

What do you need to know? Codes (Binary, Weighted BCD (8421 Code), Alphanumeric (ASCII), Unit Distance(Gray)) Number of bits needed?