Slide 1 1 Lecture DIGITAL SYSTEMS Chapter 5 Digital Arithmetic Operations and Circuits Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technical Education Faculty of Electrical & Electronic Engine[.]
HCMC University of Technical Education Faculty of Electrical & Electronic Engineering Lecture: DIGITAL SYSTEMS Chapter Digital Arithmetic: Operations and Circuits Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Contents Cộng trừ nhị phân Cộng trừ hệ thống bù Cộng số BCD Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Binary Addition Cộng nhị phân Example + 0 1 (3) 1 (6) Example + 0 (9) 0 1 (3) 0 1 (3) 010.110 (2.750) 110.001 (6.125) 1 (6) - 011.011 (3.375) 1 (6) + -0 1 (-3) 0 1 (3) Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Addition in 2’s-Complement System Bù (1’s-Complement) Form 101101 original binary number 010010 Bù (complement each bit to form 1’s complement) Bù (2’s-Complement )Form + 101101 binary equivalent of 4510 010010 complement each bit to form 1’s complement 000001 add to form 2’s complement 010011 2’s complement (-4510) of original binary number Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Addition in 2’s-Complement System Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Số trừ hệ thống bù Example 5.3 2’s-Complement Form 0 0 (nhị phân gốc, +4) + + 1 1 (bù 1) 00001 1 0 (bù +4 -4 01001 (+910) 11100 (-410) 00101 (+510) Disregard, result: 00101 = +510 Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Số trừ nhị phân hệ thống bù Result: Example 5.4 - 11100 (-410) bù 01001 (+910) + 11100 (-410) - 01001 (-910) + 11100 (-410) bù 10111 (-910) bù 10011 (-1310) Disregard - Use 2’s complement for 01001 (+910) - complement each bit (+9) to form 1’s complement=10110 - add to form 2’s complement and then obtain -9 =10111 10011 (-1310) 01100 Bù 00001 (cộng) 01101 (+13) Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Cộng số BCD Tổng nhỏ hay (Sum Equals or less) Example Example Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Tổng lớn (Sum Greater than 9) Example 9.7 Example 9.8 Always + 6, meaning (BCD)+6=15, bits can count from 0-15 Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Tổng lớn (Sum Greater than 9) Sum Greater than Example Example 10 10 Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering The End 11 Assoc Prof Nguyen Thanh Hai, PhD ... Technology and Education Faculty of Electrical & Electronic Engineering Contents Cộng trừ nhị phân Cộng trừ hệ thống bù Cộng số BCD Assoc Prof Nguyen Thanh Hai, PhD HCMC University of Technology and Education... Technology and Education Faculty of Electrical & Electronic Engineering Số trừ hệ thống bù Example 5.3 2’s-Complement Form 0 0 (nhị phân gốc, +4) + + 1 1 (bù 1) 00001 1 0 (bù +4 -4 01001 (+910) 11100... PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Số trừ nhị phân hệ thống bù Result: Example 5.4 - 11100 (-410) bù 01001 (+910) + 11100 (-410) - 01001