BCD Code (Binary –Coded Decimal ) BCD Addition Decimal Arithmetic Other Decimal Codes Gray...

17
1.7 BINARY CODES BCD Code (Binary –Coded Decimal ) BCD Addition Decimal Arithmetic Other Decimal Codes Gray Code ASCII Character Code Error-Detecting Code

Transcript of BCD Code (Binary –Coded Decimal ) BCD Addition Decimal Arithmetic Other Decimal Codes Gray...

Page 1: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

17 BINARY CODES

BCD Code (Binary ndashCoded Decimal )

BCD Addition

Decimal Arithmetic

Other Decimal Codes

Gray Code

ASCII Character Code

Error-Detecting Code

Lecture 5+6

Fadwa EH

BCD Code

A number with k decimal digits willrequire 4k bits in BCD Decimal 396is represented in BCD with 12bits as

0011 1001 0110 with each group of4 bits representing one decimal

digitA decimal number in BCD is thesame as its equivalent binarynumber only when the number isbetween 0 and 9 A BCD numbergreater than 10 looks different fromits equivalent binary number eventhough both contain 1s and 0sMoreover the binary combinations

1010 through 1111 are not used andhave no meaning in BCD

Lecture 5+6

Fadwa EH

BCD Code

Example Consider decimal 185 and its corresponding

value in BCD and binary

1048766 BCD Addition

Lecture 5+6

Fadwa EH

BCD Code

Example Consider the addition of 184 + 576 = 760 in

BCD

Decimal Arithmetic

Lecture 5+6

Fadwa EH

OTHER DECIMAL CODES

Lecture 5+6

Fadwa EH

GRAY CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

American Standard Code for Information Interchange (Refer to Table 17)

A popular code used to represent information sent as character-based data It uses 7-bits to represent 94 Graphic printing characters 34 Non-printing characters Some non-printing characters are used for text format

(eg BS = Backspace CR = carriage return) Other non-printing characters are used for record marking and flow control (eg STX and ETX start and end text

areas)

Lecture 5+6

Fadwa EH

ERROR DETECTION CODE

Error-Detecting Code To detect errors in data communication and processing an

eighth bit is sometimes added to the ASCII character to indicate its parity A parity bit is an extra bit included with a message to

make the total number of 1s either even or odd Example Consider the following two characters and their even and

odd parity

Lecture 5+6

Fadwa EH

CONVERSION OR CODING

Do NOT mix up conversion of a decimal number to a

binary number with coding a decimal number with a

BINARY CODE 1310 = 11012 (This is conversion) 13 hArr 0001|0011 (This is coding)

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 2: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

BCD Code

A number with k decimal digits willrequire 4k bits in BCD Decimal 396is represented in BCD with 12bits as

0011 1001 0110 with each group of4 bits representing one decimal

digitA decimal number in BCD is thesame as its equivalent binarynumber only when the number isbetween 0 and 9 A BCD numbergreater than 10 looks different fromits equivalent binary number eventhough both contain 1s and 0sMoreover the binary combinations

1010 through 1111 are not used andhave no meaning in BCD

Lecture 5+6

Fadwa EH

BCD Code

Example Consider decimal 185 and its corresponding

value in BCD and binary

1048766 BCD Addition

Lecture 5+6

Fadwa EH

BCD Code

Example Consider the addition of 184 + 576 = 760 in

BCD

Decimal Arithmetic

Lecture 5+6

Fadwa EH

OTHER DECIMAL CODES

Lecture 5+6

Fadwa EH

GRAY CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

American Standard Code for Information Interchange (Refer to Table 17)

A popular code used to represent information sent as character-based data It uses 7-bits to represent 94 Graphic printing characters 34 Non-printing characters Some non-printing characters are used for text format

(eg BS = Backspace CR = carriage return) Other non-printing characters are used for record marking and flow control (eg STX and ETX start and end text

areas)

Lecture 5+6

Fadwa EH

ERROR DETECTION CODE

Error-Detecting Code To detect errors in data communication and processing an

eighth bit is sometimes added to the ASCII character to indicate its parity A parity bit is an extra bit included with a message to

make the total number of 1s either even or odd Example Consider the following two characters and their even and

odd parity

Lecture 5+6

Fadwa EH

CONVERSION OR CODING

Do NOT mix up conversion of a decimal number to a

binary number with coding a decimal number with a

BINARY CODE 1310 = 11012 (This is conversion) 13 hArr 0001|0011 (This is coding)

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 3: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

BCD Code

Example Consider decimal 185 and its corresponding

value in BCD and binary

1048766 BCD Addition

Lecture 5+6

Fadwa EH

BCD Code

Example Consider the addition of 184 + 576 = 760 in

BCD

Decimal Arithmetic

Lecture 5+6

Fadwa EH

OTHER DECIMAL CODES

Lecture 5+6

Fadwa EH

GRAY CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

American Standard Code for Information Interchange (Refer to Table 17)

A popular code used to represent information sent as character-based data It uses 7-bits to represent 94 Graphic printing characters 34 Non-printing characters Some non-printing characters are used for text format

(eg BS = Backspace CR = carriage return) Other non-printing characters are used for record marking and flow control (eg STX and ETX start and end text

areas)

Lecture 5+6

Fadwa EH

ERROR DETECTION CODE

Error-Detecting Code To detect errors in data communication and processing an

eighth bit is sometimes added to the ASCII character to indicate its parity A parity bit is an extra bit included with a message to

make the total number of 1s either even or odd Example Consider the following two characters and their even and

odd parity

Lecture 5+6

Fadwa EH

CONVERSION OR CODING

Do NOT mix up conversion of a decimal number to a

binary number with coding a decimal number with a

BINARY CODE 1310 = 11012 (This is conversion) 13 hArr 0001|0011 (This is coding)

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 4: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

BCD Code

Example Consider the addition of 184 + 576 = 760 in

BCD

Decimal Arithmetic

Lecture 5+6

Fadwa EH

OTHER DECIMAL CODES

Lecture 5+6

Fadwa EH

GRAY CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

American Standard Code for Information Interchange (Refer to Table 17)

A popular code used to represent information sent as character-based data It uses 7-bits to represent 94 Graphic printing characters 34 Non-printing characters Some non-printing characters are used for text format

(eg BS = Backspace CR = carriage return) Other non-printing characters are used for record marking and flow control (eg STX and ETX start and end text

areas)

Lecture 5+6

Fadwa EH

ERROR DETECTION CODE

Error-Detecting Code To detect errors in data communication and processing an

eighth bit is sometimes added to the ASCII character to indicate its parity A parity bit is an extra bit included with a message to

make the total number of 1s either even or odd Example Consider the following two characters and their even and

odd parity

Lecture 5+6

Fadwa EH

CONVERSION OR CODING

Do NOT mix up conversion of a decimal number to a

binary number with coding a decimal number with a

BINARY CODE 1310 = 11012 (This is conversion) 13 hArr 0001|0011 (This is coding)

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 5: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

OTHER DECIMAL CODES

Lecture 5+6

Fadwa EH

GRAY CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

American Standard Code for Information Interchange (Refer to Table 17)

A popular code used to represent information sent as character-based data It uses 7-bits to represent 94 Graphic printing characters 34 Non-printing characters Some non-printing characters are used for text format

(eg BS = Backspace CR = carriage return) Other non-printing characters are used for record marking and flow control (eg STX and ETX start and end text

areas)

Lecture 5+6

Fadwa EH

ERROR DETECTION CODE

Error-Detecting Code To detect errors in data communication and processing an

eighth bit is sometimes added to the ASCII character to indicate its parity A parity bit is an extra bit included with a message to

make the total number of 1s either even or odd Example Consider the following two characters and their even and

odd parity

Lecture 5+6

Fadwa EH

CONVERSION OR CODING

Do NOT mix up conversion of a decimal number to a

binary number with coding a decimal number with a

BINARY CODE 1310 = 11012 (This is conversion) 13 hArr 0001|0011 (This is coding)

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 6: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

GRAY CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

American Standard Code for Information Interchange (Refer to Table 17)

A popular code used to represent information sent as character-based data It uses 7-bits to represent 94 Graphic printing characters 34 Non-printing characters Some non-printing characters are used for text format

(eg BS = Backspace CR = carriage return) Other non-printing characters are used for record marking and flow control (eg STX and ETX start and end text

areas)

Lecture 5+6

Fadwa EH

ERROR DETECTION CODE

Error-Detecting Code To detect errors in data communication and processing an

eighth bit is sometimes added to the ASCII character to indicate its parity A parity bit is an extra bit included with a message to

make the total number of 1s either even or odd Example Consider the following two characters and their even and

odd parity

Lecture 5+6

Fadwa EH

CONVERSION OR CODING

Do NOT mix up conversion of a decimal number to a

binary number with coding a decimal number with a

BINARY CODE 1310 = 11012 (This is conversion) 13 hArr 0001|0011 (This is coding)

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 7: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

American Standard Code for Information Interchange (Refer to Table 17)

A popular code used to represent information sent as character-based data It uses 7-bits to represent 94 Graphic printing characters 34 Non-printing characters Some non-printing characters are used for text format

(eg BS = Backspace CR = carriage return) Other non-printing characters are used for record marking and flow control (eg STX and ETX start and end text

areas)

Lecture 5+6

Fadwa EH

ERROR DETECTION CODE

Error-Detecting Code To detect errors in data communication and processing an

eighth bit is sometimes added to the ASCII character to indicate its parity A parity bit is an extra bit included with a message to

make the total number of 1s either even or odd Example Consider the following two characters and their even and

odd parity

Lecture 5+6

Fadwa EH

CONVERSION OR CODING

Do NOT mix up conversion of a decimal number to a

binary number with coding a decimal number with a

BINARY CODE 1310 = 11012 (This is conversion) 13 hArr 0001|0011 (This is coding)

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 8: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

American Standard Code for Information Interchange (Refer to Table 17)

A popular code used to represent information sent as character-based data It uses 7-bits to represent 94 Graphic printing characters 34 Non-printing characters Some non-printing characters are used for text format

(eg BS = Backspace CR = carriage return) Other non-printing characters are used for record marking and flow control (eg STX and ETX start and end text

areas)

Lecture 5+6

Fadwa EH

ERROR DETECTION CODE

Error-Detecting Code To detect errors in data communication and processing an

eighth bit is sometimes added to the ASCII character to indicate its parity A parity bit is an extra bit included with a message to

make the total number of 1s either even or odd Example Consider the following two characters and their even and

odd parity

Lecture 5+6

Fadwa EH

CONVERSION OR CODING

Do NOT mix up conversion of a decimal number to a

binary number with coding a decimal number with a

BINARY CODE 1310 = 11012 (This is conversion) 13 hArr 0001|0011 (This is coding)

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 9: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

ASCII CHARACTER CODE

American Standard Code for Information Interchange (Refer to Table 17)

A popular code used to represent information sent as character-based data It uses 7-bits to represent 94 Graphic printing characters 34 Non-printing characters Some non-printing characters are used for text format

(eg BS = Backspace CR = carriage return) Other non-printing characters are used for record marking and flow control (eg STX and ETX start and end text

areas)

Lecture 5+6

Fadwa EH

ERROR DETECTION CODE

Error-Detecting Code To detect errors in data communication and processing an

eighth bit is sometimes added to the ASCII character to indicate its parity A parity bit is an extra bit included with a message to

make the total number of 1s either even or odd Example Consider the following two characters and their even and

odd parity

Lecture 5+6

Fadwa EH

CONVERSION OR CODING

Do NOT mix up conversion of a decimal number to a

binary number with coding a decimal number with a

BINARY CODE 1310 = 11012 (This is conversion) 13 hArr 0001|0011 (This is coding)

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 10: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

ERROR DETECTION CODE

Error-Detecting Code To detect errors in data communication and processing an

eighth bit is sometimes added to the ASCII character to indicate its parity A parity bit is an extra bit included with a message to

make the total number of 1s either even or odd Example Consider the following two characters and their even and

odd parity

Lecture 5+6

Fadwa EH

CONVERSION OR CODING

Do NOT mix up conversion of a decimal number to a

binary number with coding a decimal number with a

BINARY CODE 1310 = 11012 (This is conversion) 13 hArr 0001|0011 (This is coding)

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 11: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

CONVERSION OR CODING

Do NOT mix up conversion of a decimal number to a

binary number with coding a decimal number with a

BINARY CODE 1310 = 11012 (This is conversion) 13 hArr 0001|0011 (This is coding)

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 12: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

BINARY LOGIC

Binary logic consists of binary variables and a set of logical operations The variablesare designated by letters of the alphabet such as A B C x y z etc with eachvariable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 13: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

Binary Logic

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 14: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

BINARY LOGIC

variable having two and only two distinct possible values 1 and 0 There are threebasic logical operations AND OR and NOT

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 15: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

THE TRUTH TABLES FOR AND OR AND NOT ARE GIVEN IN TABLE 18

Binary Logic

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 16: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

EXAMPLE OF BINARY SIGNALS

Logic gates

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates
Page 17: BCD Code (Binary –Coded Decimal )  BCD Addition  Decimal Arithmetic  Other Decimal Codes  Gray Code  ASCII Character Code  Error-Detecting Code.

Lecture 5+6

Fadwa EH

GRAPHIC SYMBOLS AND INPUT-OUTPUT SIGNALS FOR LOGIC GATES

Logic gates

  • 17 BINARY CODES
  • BCD Code
  • BCD Code (2)
  • BCD Code (3)
  • Other Decimal Codes
  • Gray Code
  • ASCII Character Code
  • ASCII Character Code (2)
  • ASCII Character Code (3)
  • Error Detection Code
  • Conversion or Coding
  • Binary Logic
  • Slide 13
  • Binary Logic (2)
  • The truth tables for AND OR and NOT are given in Table 18
  • Example of binary signals
  • Graphic Symbols and Input-Output Signals for Logic gates