The decimal number 22 is stored in a 6bit signed integer for

The decimal number .22 is stored in a 6-bit signed integer format. Show how it is stored in binary A numerical answer in binary is requested.

Solution

Two\'s complement method is one of the methods used in the representation of signed integers to binary.This method is commonly used in computers to handle negative numbers and hence, the method used here is 2\'s complement method.

An N-bit (In this case 6 bits) two\'s-complement numeral system can represent every integer in the range (2N1) to +(2N1 1) which leads to the range -32 to +31. Since -22 is within the range, it can be converted to the respective binary value.

Here, the binary value of -22 is 101010 in two\'s complement.

Steps to finding the two\'s complement:

Let us convert the number to binary (ignore the sign for now) 22 is 010110 in binary (considering 6 bits of space) and we assume -22 to be the same (010110) at first

Since the number is negative,

We find the complement (invert 0\'s and 1\'s) e.g. -22 is 010110 so finding the complement is 101001

Add 1 to the complement 101001 + 1 = 101010. Therefore, -22 in two\'s complement is 101010.

 The decimal number .22 is stored in a 6-bit signed integer format. Show how it is stored in binary A numerical answer in binary is requested. SolutionTwo\'s co

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site