630 likes | 791 Views
Engineer S. A. AHSAN RAJON Lecturer Department of Computer Science, Khulna Public College, Khulna. E-mail: ahsan.rajon@gmail.com. DIGITAL LOGIC. TRUE AND FALSE !!!. Rahim will get A+ Karim will get A+ Rahim will not get A+ Karim will not get A+ Rahim Will Get A+
E N D
Engineer S. A. AHSAN RAJON Lecturer Department of Computer Science, Khulna Public College, Khulna. E-mail: ahsan.rajon@gmail.com DIGITAL LOGIC
TRUE AND FALSE !!! Rahim will get A+ Karim will get A+ Rahim will not get A+ Karim will not get A+ Rahim Will Get A+ Karim will not A+ Rahim will not get A+ Karim will get A+
TRUE AND FALSE => 1 & 0 !!! Rahim will get A+ >> TRUE Karim will get A+ >> TRUE Rahim will get A+ >> FALSE Karim will get A+ >> TRUE Rahim Will Get A+ >> TRUE Karim will get A+ >> FALSE Rahim will get A+ >> FALSE Karim will get A+ >> FALSE
TRUE AND FALSE => 1 & 0 !!! Rahim will get A+ TRUE >> 1 Karim will get A+ TRUE >> 1 Rahim will get A+ FALSE >> 0 Karim will get A+ TRUE >> 1 Rahim Will Get A+ TRUE >> 1 Karim will get A+ FALSE >> 0 Rahim will get A+ FALSE >> 0 Karim will get A+ FALSE >> 0
TRUE AND FALSE => 1 & 0 !!! • Thus we may define everything with • simply 0 AND 1 • What computer understands is simply TRUE and FALSE. • So, computations based on this binary is sufficient for any computations.
LOGIC GATES • We may also have all the computations based on a couple of operations. • AND • OR • NOT • NAND • NOR
AND • AND • TRUE AND TRUE >> TRUE • TRUE AND FALSE >> FALSE • FALSE AND TRUE >> FALSE • FALSE AND FALSE >> FALSE • It means
OR • OR • TRUE AND TRUE >> TRUE • TRUE AND FALSE >> TRUE • FALSE AND TRUE >> TRUE • FALSE AND FALSE >> FALSE • It means
NOT • NOT • NOT of TRUE >> FALSE • NOT of FALSE >> TRUE • It means
NOT GATE A A
REPRESENTATION AND represented by . Often A^B is also used. OR Represented by A+B NOT Represented by A’
FOR THREE VARIABLES Rahim will get A+ Karim will get A+ Mohim will get A+ Rahim will not get A+ Karim will not get A+ Mohim will get A+ Rahim Will Get A+ Karim will not A+ Mohim will get A+ Rahim will not get A+ Karim will not get A+ Mohim will get A+
FOR THREE VARIABLES Rahim will get A+ Karim will get A+ Mohim will not get A+ Rahim will not get A+ Karim will not get A+ Mohim will not get A+ Rahim Will Get A+ Karim will not A+ Mohim will not get A+ Rahim will not get A+ Karim will not get A+ Mohim will not get A+
FOR THREE VARIABLES Rahim will get A+ >> TRUE >> 1 Karim will get A+ >> TRUE >> 1 Mohim will get A+ >> TRUE >> 1 Rahim will get A+ >> FALSE >> 0 Karim will get A+ >> TRUE >> 1 Mohim will get A+ >> TRUE >> 1 Rahim Will Get A+ >> TRUE >> 1 Karim will get A+ >> FALSE >> 0 Mohim will get A+ >> TRUE >> 1 Rahim will get A+ >> FALSE >> 0 Karim will get A+ >> FALSE >> 0 Mohim will get A+ >> TRUE >> 1
FOR THREE VARIABLES Rahim will get A+ >> TRUE >> 1 Karim will get A+ >> TRUE >> 1 Mohim will get A+ >> FALSE >> 0 Rahim will get A+ >> FALSE >> 0 Karim will get A+ >> TRUE >> 1 Mohim will get A+ >> FALSE >> 0 Rahim Will Get A+ >> TRUE >> 1 Karim will get A+ >> FALSE >> 0 Mohim will get A+ >> FALSE >> 0 Rahim will get A+ >> FALSE >> 0 Karim will get A+ >> FALSE >> 0 Mohim will get A+ >> FALSE >> 0
OR • OR • TRUE AND TRUE >> TRUE • TRUE AND FALSE >> TRUE • FALSE AND TRUE >> TRUE • FALSE AND FALSE >> FALSE • It means
NOT • NOT • NOT of TRUE >> FALSE • NOT of FALSE >> TRUE • It means
LOGIC GATES… • THESE ARE CALLED GATES • AND GATE • OR GATE • NOT GATE
TWO INPUT AND GATE A O/P B
THREE INPUT AND GATE A O/P B C
TWO INPUT OR GATE A O/P B
TWO INPUT OR GATE A O/P B c
THREE INPUT AND GATE A O/P B C
OTHER GATES • NAND GATES • NAND = NOT OF AND • NOR GATE • NOT OF OR
THREE INPUT NAND GATE A O/P B C
THREE INPUT NOR GATE A O/P B c
XOR • Exclusive OR Gate • When both the operands are same, the result is 0 • When the operands are different, the result is 1.
XOR Exclusive OR Gate
XNOR Gate… XNOR = NOT of XOR A XNOR B = NOT OF (A XOR B) =
XNOR Gate… XNOR
CODES • ASCII • American Standard Codes for Information Interchange • 128 • Then 256 • English and Latin
CODES • BCD • Binary Coded Decimal • 4 bits • 8421 Code • BCD 1001=(8X1)+(4X0)+(2X0)+(1X1) = DECIMAL 9 • BCD 0010=(8X0)+(4X0)+(2X1)+(1X0) = DECIMAL 2
CODES… • EBCDIC • Extended Binary Coded Decimal Interchange Format. • For example: 00000101=Pound Sign
CODES • UNICODE • Sign/Symbol for all the languages. • Now commonly used. • Unicode Consortium. • 65,535+ codes
SIMPLE MATH… ___________ __ A+B+ C __ A+B+ C __ C A C B
BOOLEAN ALGEBRA… Simplification
BOOLEAN ALGEBRA… Slight Change: