Binary Codes Computers and other digital systems "work" with binary numbers. I/P & O/P is usually done using decimal numbers, alphabetics, special symbols.

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

Assembly Language for Intel-Based Computers, 4 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify and.
Chapter 2 : Number System
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 3 Dr. Shi Dept. of Electrical and Computer Engineering.
Overview Digital Systems and Computer Systems Number Systems [binary, octal and hexadecimal] Arithmetic Operations Base Conversion Decimal Codes [BCD (binary.
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify.
University College Cork IRELAND Number Systems, Data Types, Codes Logic Gates: An Introduction.
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
Mantıksal Tasarım – BBM231 M. Önder Efe
01 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
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.
Chapter 1 Number Systems and Codes 1. Outline 1. NUMBER SYSTEMS AND CODES 2. DIGITAL ELECTRONIC SIGNALS AND SWITCHES 3. BASIC LOGIC GATES 4. PROGRAMMABLE.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 2 Bits, Data Types & Operations Integer Representation Floating-point Representation.
CSC 101 Introduction to Computing Lecture 9 Dr. Iftikhar Azim Niaz 1.
Computers Organization & Assembly Language
CSU0014 Assembly Languages Homepage: Textbook: Kip R. Irvine, Assembly Language for Intel-Based Computers,
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
©zaher elsir Sudan Academy for Banking & Financial Sciences Decimal Number System Base (Radix)10 Digits0, 1, 2, 3, 4, 5, 6, 7, 8, 9 e.g The magnitude.
Assembly Language for x86 Processors 7th Edition
Decimal Binary Octal Hex
Logic and Digital System Design - CS 303
Binary Arithmetic & Data representation
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
Binary Code.
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.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
Course contents Chapter 1 - section 1.6 Chapter 2 - all sections Chapter – 4.7, and 4.12 Chapter , Chapter 6 - all sections.
Chapter 1: Digital Computers and Information Illustration at beginning of each Chapter Base 10 Binary Base 2 Octal Base 8 Hex bas
1 Lecture 3 ENGRE 254 1/14/09. 2 Lecture 1 review Digital signals assume two values represented by “0” and “1”. Typically a “0” represents a voltage near.
Digital Circuits Text Book –M. M. Mano, "Digital Design," 3rd Ed., Prentice Hall Inc., Reference –class notes Grade –quizzes:15% –mid-term:27.5%
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
SAK Chapter 21 Chapter 2 : Number System 2.1 Decimal, Binary, Octal and Hexadecimal Numbers 2.2 Relation between binary number system with other.
CEC 220 Digital Circuit Design Binary Codes
Agenda Character representation Numerical Conversions ASCII EBCDIC
1 Lecture 10: Floating Point, Digital Design Today’s topics:  FP arithmetic  Intro to Boolean functions.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture Logic Design: Part 1.
Logic Design EE-2121 Manesh T. Digital Systems  Introduction  Binary Quantities and Variables  Logic Gates  Boolean Algebra  Combinational Logic.
Boolean Algebra Boolean algebra was introduced by George Boole in his first book The Mathematical Analysis of Logic (1847), perfected in the late 19th.
ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
Nguyen Le CS147.  2.4 Signed Integer Representation  – Signed Magnitude  – Complement Systems  – Unsigned Versus Signed Numbers.
BINARY SYSTEMS ENGR. KASHIF SHAHZAD 1. BINARY NUMBERS 1/2 Internally, information in digital systems is of binary form groups of bits (i.e. binary numbers)
1 Binary Signals Logic gate circuits are designed to input and output only two types of signals: “high” (1) and “low” (0), as represented by a variable.
COMPUTER ORGANIZATION 4 TH LECTURE. ASCII Code  ASCII ( American Standard Code for Information Interchange).  Input and output devices that communicate.
Chapter 1 Digital Systems and Binary Numbers
Logic gates.
3 – Boolean Logic and Logic Gates 4 – Binary Numbers
Boolean Algebra & Logic Gates
Morgan Kaufmann Publishers
Computer Code.
Computer Science 210 Computer Organization
Data Transfer ASCII FILES.
Number Systems.
University of Gujrat Department of Computer Science
Chapter 2 Bits, Data Types & Operations Integer Representation
Digital Electronics & Logic Design
Digital Logic & Design Lecture 05
Computer Science 210 Computer Organization
ECB2212-Digital Electronics Codes
Binary Numbers.
Table 1.1 Powers of Two.
Learning Intention I will learn how computers store text.
Lecture 5 Binary Operation Boolean Logic. Binary Operations Addition Subtraction Multiplication Division.
ECE 331 – Digital System Design
Presentation transcript:

Binary Codes Computers and other digital systems "work" with binary numbers. I/P & O/P is usually done using decimal numbers, alphabetics, special symbols. Some way of representing alphanumerics with binary numbers is required. These representations are called codes. Many codes are possible, and a few standard codes are used, such as: ASCII - American Standard Code for Information Interchange   EBCDIC - Extended Binary Coded Decimal Interchange Code    BCD - Binary Coded Decimal. For numbers only.   Hardware and/or software is required to convert coded numbers into binary numbers before any arithmetic operations can take place. 7-bit System Used in Big Mainframe Systems

Alphanumeric Character codes Character 6-bit internal code ASCII code 8-bit EBCDIC A 010 001 100 0001 1100 0001 B 010 010 100 0010 1100 0010 C 010 011 100 0011 1100 0011 D 010 100 100 0100 1100 0100 E 010 101 100 0101 1100 0101 F 010 110 100 0110 1100 0110 G 010 111 100 0111 1100 0111 H 011 000 100 1000 1100 1000 I 011 001 100 1001 1100 1001 J 100 001 100 1010 1101 0001 ………… …………………

ASCII 7-bit Codes

Binary Codes for Decimal Numbers Weighted codes: 8421, 6311, Excess-3 Non-weighted codes: 2-out-of-5, Gray

Binary Codes for Decimal Numbers (cont.) BCD - Convert decimal numbers to binary code, digit by digit (at least bits required).   8421 code: 95.16 6311 code: 925 4 (for each decimal digit) 1001 0101 . 0001 0110 9 5 1 6 1100 0011 0111 By looking up the previous table

The Meaning of Data 5012110 C I 9096 ??? Meaningless, why??? e.g.: Consider the following 16-cell register If one assumes that the content of the register represents a binary integer, the decimal number is: 1100001111001001 =   If one assumes an 8-bit EBCDIC code, the two characters are: In excess-3 code:    In BCD code: The same bit configuration may be interpreted differently for different types of elements of information. The computer must be programmed to process this information according to the type of information stored. 5012110 C I 9096 ??? Meaningless, why???

Boolean Algebra George Boole (1815-1864) applied a set of symbols to logical operations. Digital electronics applies his set theory and logic to (binary) switching networks. Binary number system is used to represent the two possible states of our systems.  The symbols 0 & 1 are used to represent:   True or False   Flow or No Flow   Open or Closed   Voltage1 or Voltage2   etc. word statements currents, fluids switches, doors, etc. anything with 2 states

Boolean Algebra Deals with manipulation of Variables & Constants Boolean Variables, such as X, Y, Z, A, B, C, etc. can have "values" of either 0 or 1.  0 & 1 are constants & are symbols only, representing two different states of a quantity. i.e. F or T Low voltage or high voltage, usually written L or H Flow or not flow e.g. 0V  logical 0 +5V  logical 1 or 0V  1 +5V  0 + ve logic - ve logic

NOT (compliment or invert) AND OR Basic Operations NOT (compliment or invert) AND OR Only 3 e.g. Not 1 is written as:   Not :   X and Y :   X or Y :   1 or X :  If the variables represent voltages of the I/P or O/P of a switching network, we symbolically represent these operations by: NOT If O/P is called C, we write: 1´ or 1 X ´ or X X • Y X + Y 1 + X inversion symbol or “bubble C = X´

Boolean Operations (cont.) AND   OR where values for X, A, B, C are . They actually correspond to two different voltage levels when realized electronically. e.g. Characteristics of an Inverter B 0 or 1 0 & 5V; -12V & 0V, etc. Truth Table X C 0 1 1 0 if X = 0 C = 1 if X = 1 C = 0

Boolean Operations (cont.) AND gate A B C A B C = A ● B 0 0 0 0 1 0 0 0 1 1 1 Logical Multiplication OR gate A B C A B C = A + B 1 1 Logical Addition 1 Also called Inclusive OR 1 1