MHB Determine the decimal values of the following 1's complement numbers:

  • Thread starter Thread starter shamieh
  • Start date Start date
  • Tags Tags
    Numbers
AI Thread Summary
In the discussion on determining decimal values of 1's complement numbers, participants clarify that a leading 1 indicates a negative value, while a leading 0 indicates a positive one. The confusion arises over why -511 is used as a starting point instead of -512, with the explanation that the initial addition of 1 is part of the 1's complement calculation. For the binary number 1011100111, the calculations yield -280 using the method of summing the positive values and adjusting for the negative base. An alternative method involves converting the binary to unsigned, then subtracting from the maximum value for the digit count, which simplifies the process. Overall, the discussion emphasizes different approaches to calculating decimal values from binary representations in 1's complement.
shamieh
Messages
538
Reaction score
0
Determine the decimal values of the following 1's complement numbers:

So i understand that if the left most bit number is a 1 it is a negative, and if it is a 0 it is poisitive. But my question is why do they start out with -511 when $$2^9$$ is obviously -512. Why are they adding 1 to it initially?

1011100111 = -511 + 128 + 64 + 32 + 4 + 2 + 1 = -280
 
Technology news on Phys.org
After looking at it some more, it looks like I would say -511 + [numbers here] and I would + 1 initially, I guess that 's what "1's complacent means", similarly when it 's "2's complacent" it looks like I would not +1, but would still have a negative number if my left most bit began with a 1.

Decimal values (1’s complement)
(a) 0111011110 = 256 + 128 + 64 + 16 + 8 + 4 + 2 = 478
(b) 1011100111 = -511 + 128 + 64 + 32 + 4 + 2 + 1 = -280

Decimal values (2’s complement)
(a) 0111011110 = 256 + 128 + 64 + 16 + 8 + 4 + 2 = 478
(b) 1011100111 = -512 + 128 + 64 + 32 + 4 + 2 + 1 = -281
 
The way I look at one's complement is to first find the unsigned value:

$$(1011100111)_2=1+2+4+32+64+128+512=743$$

Now count the number of binary digits, which is 10, and so subtract $2^{10}-1=1023$:

$$743-1023=-280$$
 
Wow that way is so much easier then what the book teaches.
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
I am trying to run an .ipynb file and have installed Miniconda as well as created an environment as such -conda create -n <env_name> python=3.7 ipykernel jupyter I am assuming this is successful as I can activate this environment via the anaconda prompt and following command -conda activate <env_name> Then I downloaded and installed VS code and I am trying to edit an .ipynb file. I want to select a kernel, via VS Code but when I press the button on the upper right corner I am greeted...
Back
Top