90 likes | 101 Views
Explore addition, subtraction, and multiplication in binary, octal, and hexadecimal. Learn the concepts, rules, and examples for non-decimal math operations to master arithmetic in various number systems.
E N D
Non decimal math: doing math with non-base 10 number systems Addition, subtraction and multiplication with binary, octal and hexadecimal
1 Addition in binary: 4 cases Case 2: sum = 1, no carry 0 + 1 1 • Case 1: sum = 0, no carry • 0 • + 0 • 0 Case 3: sum = 1, no carry 1 + 0 1 Case 4: sum 1, carry = 1 1 + 1 1 + 1 = 2 (in decimal) = 11 (in binary) 1 0
Non-decimal addition: in general • If the sum of the two digits being added can be represented in the base, no problem, perform the addition as normal. • If the sum of the two digits being added are too large to be represented in the base then convert the numbers to a value in the base that you are working with before proceeding with the addition.
Non-decimal addition: an example • e.g. 1308 • + 528 2028
Non-decimal subtraction: in general • If you need to perform a borrow keep in mind that the amount that you borrow equals the base (e.g., in decimal when you perform a borrow it equals 10).
Non-decimal subtraction: an example • e.g., 10002 • - 00012 01112
Non-decimal multiplication: in general • If the product of the two digits being multiplied can be represented in the base, no problem, perform the multiplication as normal. • If the product of the two digits being multiplied are too large to be represented in the base then convert the numbers to a value in the base that you are working with before proceeding with the multiplication.
Non-decimal multiplication: an example • e.g., 1F16 • * 1216 3E16 1F016 22E16
Summary (important points) • How do perform basic mathematical operations (addition, subtraction and multiplication in different bases) • Binary • Octal • Hexadecimal