1 / 22

Computer Code

Computer Code. Introduction. The Language of electronic component is binary All numeric and non-numeric data must be converted into binary language so that computer can understand it Representation of all numeric and non-numeric data in binary digits is known as computer code

amandaw
Download Presentation

Computer Code

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Code

  2. Introduction • The Language of electronic component is binary • All numeric and non-numeric data must be converted into binary language so that computer can understand it • Representation of all numeric and non-numeric data in binary digits is known as computer code • Computer code is represented in different coding schemes

  3. Coding Schemes • BCD Code • ASCII Code • EBCDIC Code • Unicode

  4. BCD Code • Stands for Binary Coded Decimal • Used to represent decimal digits in binary • 4-bit code • Each decimal digit is represented by 4 binary digits • Used by early computers

  5. BCD Code http://electronicsarea.com/bcd-code/

  6. Example http://electronicsarea.com/bcd-code/

  7. Example http://electronicsarea.com/bcd-code/

  8. ASCII Code • American Standard Code for Information Interchange • Most widely used coding scheme for personal computers • 7-bit code can represent 128 characters • Not enough to represent some graphical characters displayed on computer screens • An 8 bit code can represent 256 characters • Extended 128 unique codes represent graphic symbols

  9. ASCII Code http://www.gjszlin.cz/ivt/esf/ostatni-sin/kodovani-textu.php?lang=1

  10. Example

  11. EBCDIC Code • Extended Binary Coded Decimal Interchange Code • 8-bit code • Divided into two group of 4 bits • Each group cam represent one hexadecimal digit • Normally used in mainframe computers • Can represent 256 characters

  12. EBCDIC Code http://www.rtty.com/CODECARD/codecrd1.htm

  13. Unicode • 16 bit code • Represent 65536 characters • Started to replace ASCII code • Can represent the characters of all languages in the world

  14. Boolean Algebra • Algebra of logic • Also called logical algebra or switching algebra • Uses symbols to represent logical statements instead of words • Consists of different rules to manipulate rules • Similar to calculus

  15. Boolean Algebra • Used in the designing of logic circuits in computer • Computer chips consists of transistors that are arranged in logical gates • Each gate performs a single logical operation • Computer performs logical operation by processing electrical pulses • Design of a particular circuit is based on a set of logical statements • Results of boolean algebra can be true or false • The digit 1 indicates true and 0 indicates false result

  16. Elements of Boolean Algebra • An expression in Boolean Algebra can be formed using different elements of Boolean algebra • Different elements of Boolean algebra are as follows: • Boolean Variables • Boolean Constants • Logical Operators • Parentheses

  17. Logical Operators in Boolean Algebra • Symbols used to perform logical operations are called logical operators • Different logical operators are: • AND • OR • NOT

  18. Basic Logic Gates • Many basic functions of the arithmetic and control units are carried out by logic gates • Each gate accepts input and produces an output • NOT Gate • AND Gate • OR Gate • NAND Gate • NOR Gate • XOR Gate • XNOR Gate

  19. Boolean Expression • Logical statement that is either true or false • Consists of different elements of Boolean Algebra

  20. Truth Table Logic Equation = X Y Z × + F X Z Y = + F X Y Z 0 0 0 0 0 0 1 1 Logic Diagram 0 1 0 0 X 0 1 1 0 1 0 0 1 F Y 1 0 1 1 1 1 0 1 Z 1 1 1 1 Logic Diagrams and Expressions • Boolean equations, truth tables and logic diagrams describe the same function! • Truth tables are unique, but expressions and logic diagrams are not. This gives flexibility in implementing functions.

  21. Invented by George Boole in 1854 • An algebraic structure defined by a set B = {0, 1}, together with two binary operators (+ and ·) and a unary operator ( ) + 0 X X = 1. 2. . 1 X X = 3. 1 1 4. . 0 0 X X + = = 5. 6. X + X X X . X X = = 7. 1 8. 0 X + X X . X = = 9. X = X 10. 11. XY YX = Commutative = X + Y Y + X Associative 12. 13. (XY) Z X(Y Z) = (X + Y) Z X + (Y Z) + = + X(Y + Z) XY XZ = + Distributive 14. 15. X + YZ = (X + Y) (X + Z) DeMorgan ’ s 16. 17. X + Y X . Y X . Y X + Y = = Boolean Algebra Identity element Idempotence Complement Involution

  22. References • Slides Taken From: www.cse.yorku.ca/~mack/1011/01.NumberSystems.ppt • Introduction to Information Technology by RiazShahid, CM Aslam and SafiaIftikhar • The Concepts of Information Technology by ImranSaeed, AhsanRaza, Tariq Mehmood and ZafarHussain

More Related