to convert bin to dec, in your example
0100 0000 1110
notice that I put n^2 in the left hand column and your binary number in the middle with the LSD at position 1
I then marked (for ease of viewing) each position which contained a figure "1" with "X"
Then I just added the respective decimal numbers which were marked with the "X" to obtain 1038
2+4+8+1024=1038
0100 0000 1110
1............. 0............. 0
2............. 1............. x
4............. 1............. x
8............. 1............. x
16............ 0............. 0
32............ 0............. 0
64............ 0............. 0
128........... 0............. 0
256........... 0............. 0
512........... 0............. 0
1024......... 1............. x
2007-12-12 07:02:32
·
answer #1
·
answered by credo quia est absurdum 7
·
1⤊
0⤋
This is a trick question
The number is represented in both binary and twos complement. but as the MSB is 0 then it must be a positive number. Its not asking you to perform a two's compliment either.
So its simply a base 2 to base 10 conversion of a 12 bit number.
IE SUM OF POWERS OF 2
1,2,3,10
2+4+8+ 1024 =1038
2007-12-12 07:17:37
·
answer #2
·
answered by adam_adams_25 3
·
0⤊
0⤋
A signed integer is one that can represent negative numbers, and two's complement is the most common way to do it since it's easiest for machines to handle.
If the first bit is zero, then it's positive and you read the rest of the bits normally. If the first bit is one, then it's negative, but the number is not read normally but in reverse, that is with the first bit as one, if the rest of the bits are 1, then it is the maximum number that is negative, which is -1, and all zeros would be the minimum number that is negative, which usually is the maximum positive number but negative.
2007-12-12 06:55:04
·
answer #3
·
answered by jonathanlks 4
·
1⤊
0⤋
Convert the binary number to Base 10 (Decimal) do the sum and convert back to base 2 (Binary)
2007-12-12 06:50:16
·
answer #4
·
answered by d_v8ion 3
·
0⤊
1⤋
Yeah use google, sort stuff like this # to b the place # is your unique quantity and b is what you opt to transform too (binary, decimal, octal, hexadecimal). ie: 6 to Binary in case you desire "#" to be some thing different than a quantity in decimal, you ought to sort it like this... Binary (# shows your quantity) 0b# ie:0b101 Octal 0o# ie:0o76 Hexadecimal 0x# ie:0xAB4
2016-12-17 16:01:04
·
answer #5
·
answered by ? 4
·
0⤊
0⤋
if it is using two's complement already, doesnt that mean that 1 was already added (its already a negative number)? if so, would you not start by subtracting the one, then getting the complement?
2007-12-12 06:53:04
·
answer #6
·
answered by Anonymous
·
0⤊
0⤋