Binary Arithmetic

The second part of our laboratory class yesterday was about Binary Arithmetic. We were taught how to add and subtract values using the binary values 0 and 1.

images

In Binary Arithmetic, values 0 and 1 are the only values used and that the computer only understands the use of these two values. That is why in n-bit representations, only 0 and 1 are used.

The addition operation is easy to understand while in the subtraction operation there are some things that need to be taken note of before doing the process. These are the following: the sign of the subtrahend should be changed and that the most significant bit tells the sign of the number.

Also, the 1’s complement and 2’s complement were discussed in class. I liked this part of the discussion because it is quite tricky but easy to understand and operate. The two operations are quite similar with each other. Only a few steps were added and changed for 2’s complement.

Aside from having a no error in these operations, results of arithmetic operations do not always end up with the answer that the computer understands. There are times wherein the result of the arithmetic operation exceeds the positive limit and also there are times wherein result of the arithmetic operation is less than the negative limit. These situations are called overflow and underflow, respectively.

There are ways to detect and know if the operation resulted to an overflow, underflow and no error. The steps were dicussed in class and that these helps us know if the answers of the operation we used resulted to the correct answer that the computer understands.

The Number Systems

images

In our laboratory class yesterday, we discussed about the Number Systems. It is a writing system that uses numbers and letters. We tackled about Decimal (Base 10), Binary (Base 2), Octal (Base 8) and Hexadecimal (Base 16) Values.

102l2gi0_New-Sheet

Afterwards, conversion of Decimal to Binary, Octal and Hexadecimal and vice versa were taught in class. Various steps were discussed and illustrated in class. Examples were given for further understanding. The exercise was quite confusing at first and that it needs focus and concentration.

Converting Decial to Binary is my favorite part in the exercise. It is quite easy to understand. However, there are conversions that need a lot of thinking such as converting Binary to Octal and Hexadecimal. During the exercise, I got somehow confuse in which steps will I use since there were a lot of steps given to us for computation.

Understanding the number systems needs a lot more practice and review but it is a fun way of understanding more of how computer understands us and also it is a way for us to connect and understand how computers uses these information to connect with us. 🙂