| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Binary, Octal and Hexadecimal Arithmetic (Page 1 of 2) Many of us use arithmetic every day as part of our regular lives without really noticing it, to give us the information we need to make decisions. In a similar way, computers perform arithmetic operations all the time as part of their normal operation. The main differences between how computers do it and how we do it are two-fold: computers use binary numbers, and computers are much faster. As I said in my introduction to binary, octal and hexadecimal numbers, those forms are different representations of numbers, and are not really much different than decimal numbers. They just have a different number of values per digit. In a similar vein, arithmetic with binary, octal or hexadecimal numbers is not that much different from the equivalent operations with decimal numbers. You just have to keep in mind that you are working with powers of 2, 8 or 16, instead of 10, which isnt always easy to do. As was the case with conversions, calculators are usually the way to go if you need to do math with binary, octal or hexadecimal numbers. If your calculator only does math with decimal numbers, one trick is to convert the numbers to decimal, then perform the operation, and convert back the result. However, you can fairly easily do the same addition, subtraction, multiplication and division on binary, octal or hex numbers that you do with decimal numbers, by using the Windows Calculator program or equivalent. Multiplication and division of binary numbers is a common operation within computers, but isn't a calculation that often needs to be done by people who are working with them. Addition and subtraction are much more common (especially addition), and have the added bonus of being much easier to explain. You probably won't need to do this type of arithmetic that often, but it's good to understand it, at least a little. I am going to provide just a couple of examples to give you the general idea.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. |