HCMC University of Technical Education Faculty of Electrical & Electronic Engineering Lecture: DIGITAL SYSTEMS Chapter 5: Digital Arithmetic Representing Signed Numbers Assoc. Prof. Nguyen Thanh Hai, PhD 1 HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Representing Signed Numbers Figure shows 2 registers which contain binary numbers, in which cells from A0 to A5 contain bits 0/1 and cell A6 is for sign-bit, particularly 0 (sign bit +) and 1 (sign bit -). Representation of six-bit FF registers with signed numbers in sign-magnitude form Assoc. Prof. Nguyen Thanh Hai, PhD 2 HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Representing Signed Numbers 1’s-Complement Form 101101 original binary number Changing each 0 to 1 and each 1 to 0 010010 complement each bit to form 1’s complement 2’s-Complement Form + 101101 binary equivalent of +4510 010010 Changing to form 1’s complement 000001 add 1 to form 2’s complement 010011 2’s complement (-4510) of original binary number 3 Assoc. Prof. Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Representing Signed Numbers Example 4 Assoc. Prof. Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Representing Signed Numbers 5 Assoc. Prof. Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Representing Signed Numbers b. 11010 11010; bù 1: 00101; bù 2: 00110 6 Assoc. Prof. Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Representing Signed Numbers Outcome assessment questions 7 Assoc. Prof. Nguyen Thanh Hai, PhD HCMC University of Technology and Education Faculty of Electrical & Electronic Engineering Representing Signed Numbers The End 8 Assoc. Prof. Nguyen Thanh Hai, PhD