170 likes | 296 Views
Digital Logic & Design. By Ahmad Bilal. 2. ZAROORI AILAN. QUIZ will be held in next class Topic includes Numbering Systems Logic gates Truth Tables MCQs of General discussion in class . Guys have you ever seen this ? How do they actually work. BCD CODE.
E N D
Digital Logic & Design By Ahmad Bilal 2
ZAROORI AILAN • QUIZ will be held in next class • Topic includes • Numbering Systems • Logic gates • Truth Tables • MCQs of General discussion in class
Guys have you ever seen this ? How do they actually work
BCD (Binary Coded Decimal) Code • Binary Code to represent decimal digits 0-9 • Used by Decimal Number Displays • How many binary bits are required to represent 10 unique codes
BCD Addition 23 0010 0011 45 0100 0101 68 0110 1000 23 0010 0011 49 0100 1001 72 0110 1100 • 1100 is illegal BCD number
BCD Addition • Add a 0110 (6) to an invalid BCD number • Carry added to the most significant BCD digit 23 0010 0011 49 0100 1001 72 0110 1100 0110 0111 0010
BCD Subtraction • Carried out by two Methods • 9’s Compliment • 10’s Compliment
9’s Compliment • For binary Subtraction , we need to learn how to find 9’s Compliment • 9’s Compliment is easy • 9,s compliment of 5= 9-5 which is equal to 4 • What will be the 9’s Compliment if 19 • What is the 9,s compliment of 158
10, Compliment • Well its easy. Just take 9’s compliment. And Add I to the answer • Find 10’s Compliment of 5 • =9-5=4…………………..9’s Compliment • 4+1=5…………………….10’s Compliment
Subtraction • Subtract 8-2 • Find 9’s Compliment of 2 (as it is to be subtracted) • So 9-2=7 • Now add the answer = 8+7
Now 8= 1 0 0 0 7 = 0 1 1 1 15=1 1 1 1 Now 15 is invalid Code. So Add the both digits together = 1+5 . Hence the Answer Only Do this When we have Carry
18-24 • Step 1 : 24 9,s Compliment =75 • Step 2 : 18+75=93 • Step 3 : The answer is Valid Binary Code • Step 4 : There is no Carry it means answer is - • Step 5 : When ever there is no carry ,subtract your answer every digit from 9 • Step 6 : 9 3 9 9 - 6