return to tranceaddict TranceAddict Forums Archive > Main Forums > Chill Out Room

 
Nerds wanted - binary help
View this Thread in Original format
Michael19
right so lads. Need help with binary addition etc.


i know how to work normal binary. One thing i dont know is ones and twos complement subtraction though.


say the question is 110101 - 011011 base 2.


I change 011011 to 100100 dont i? is that all i need to do, just work it out then or is there more?


Need to know how to convert from octal and hexadecimal to binary aswell.

e.g
123(base 8) to octal and hexi - how do i do it?


any help would be brilliant.

cheers.
Sunsnail
its like
1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1111 10000 10001 10010 10011 10100 10101 10110 10111 11000 11001 11010 11011 11100 11101 11110 11111
Boomer187
http://www.phys.ualberta.ca/~gingri...es/node119.html


???



maybe google it?
Resnick
quote:
Originally posted by Michael19
right so lads. Need help with binary addition etc.


i know how to work normal binary. One thing i dont know is ones and twos complement subtraction though.


say the question is 110101 - 011011 base 2.


I change 011011 to 100100 dont i? is that all i need to do, just work it out then or is there more?


Need to know how to convert from octal and hexadecimal to binary aswell.

e.g
123(base 8) to octal and hexi - how do i do it?



any help would be brilliant.

cheers.


well base 8 is octal...i think u meant, from octal to binary/hex?

its prob easier to just convert to binary, then go to either octal or hex, so in hex, u group every 4 numbers, and in octal u group every 3

so 10101110 the last digit in octal is 6(110), and in hex its E(1110), and u just move along and do the whole thing so hex = AE, octal = 256

if u do octal - hex or other way, just convert to binary first

so 123 = 001 010 011 in octal, and = 0001 0010 0011 in hex,

ones complement as i recall, u just flip all digits, so 1101 = 0010

in 2's complement u do the same thing, except add 1 at the end

so 1110 = 0001 + 1 = 0010

and then u just add them together (but that might be wrong, thers some rules about the last digit or some crap, i dont remember )
THE_Chris
Convert to base 10, subtract, then convert back to base 2.
Michael19
quote:
Originally posted by Resnick


if u do octal - hex or other way, just convert to binary first

so 123 = 001 010 011 in octal, and = 0001 0010 0011 in hex,




the question will ask me to convert a octal number binary.


how do i work out that 1=001 2 =010 3 =011 etc etc?



dont understand chris:conf:
Goashem
use two's complement, switch all the 1s to 0s and 0s to 1 and add a 1. and then add the numbers.
Chris d(-_-)b
1o1
Cloudburst
quote:
Originally posted by Goashem
use two's complement, switch all the 1s to 0s and 0s to 1 and add a 1. and then add the numbers.


That's how you do it.
CLICK TO RETURN TO TOP OF PAGE
 
Privacy Statement