Psychonaut 0 #1 September 13, 2010 Anyone have any idea how to convert -123 the decimal to 1) Convert it to a 12-bit natural-biased binary number. 2) Convert it to a 4-digit 10's complement decimal number.Stay high pull low Quote Share this post Link to post Share on other sites
repcool 2 #2 September 13, 2010 QuoteAnyone have any idea how to convert -123 the decimal to 1) Convert it to a 12-bit natural-biased binary number. 2) Convert it to a 4-digit 10's complement decimal number. If you have Excel there are some good functions such as dec2bin. Quote Share this post Link to post Share on other sites
Psychonaut 0 #3 September 13, 2010 But does it have abilities such as converting to 12 bit signed magnitude, etc? I've conquered most of these problems but can't get these two..Stay high pull low Quote Share this post Link to post Share on other sites
Niki1 1 #4 September 13, 2010 Quote Anyone have any idea how to convert -123 the decimal to 1) Convert it to a 12-bit natural-biased binary number. 2) Convert it to a 4-digit 10's complement decimal number. I'm a graduate of the Jethro Bodine School of Arithmatic and I don't have a clue what you said after,"Anyone have any idea how to convert ..." Most of the things worth doing in the world had been declared impossilbe before they were done. Louis D Brandeis Where are we going and why are we in this basket? Quote Share this post Link to post Share on other sites
shropshire 0 #5 September 13, 2010 There's 10 types of people in this world ... Those that understand Binary maths ... and those that don't (.)Y(.) Chivalry is not dead; it only sleeps for want of work to do. - Jerome K Jerome Quote Share this post Link to post Share on other sites
kawisixer01 0 #6 September 13, 2010 Simple conversions are easy, but big numbers or math I use microsoft windows calculator. If you put it into "programmer" or "scientific" mode you can convert back and forth from binary, to hex, to oct, to dec. Quote Share this post Link to post Share on other sites
shropshire 0 #7 September 13, 2010 That doesn't give the OP the answer that he needs... (.)Y(.) Chivalry is not dead; it only sleeps for want of work to do. - Jerome K Jerome Quote Share this post Link to post Share on other sites
absane 0 #8 September 13, 2010 Ok, so here are just some steps to convert it to binary (2 bits). -123 dec = -(123 dec) So, find the binary equivalent of 123. 123 = 2*(61) + 1 61 = 2*(30) + 1 30 = 2*(15) + 0 15 = 2*(7) + 1 7 = 2*(3) + 1 3 = 2*(1) + 1 1 = 2*(0) + 1 So, -123 = -1111011 And, I'm not sure what you mean by a 12-bit natural based binary number. Maybe you mean -000001111011?Don't forget to pull! Quote Share this post Link to post Share on other sites
Psychonaut 0 #9 September 13, 2010 I can convert from dec to binary, hex, base 4 8 whatever, but I'm needing help with these specific cases such as the 10's complement. In addition, from what I've been trying to figure out, the negative aspect really throws a wrench into the situation at times..Stay high pull low Quote Share this post Link to post Share on other sites
nigel99 143 #10 September 13, 2010 QuoteAnyone have any idea how to convert -123 the decimal to 1) Convert it to a 12-bit natural-biased binary number. 2) Convert it to a 4-digit 10's complement decimal number. Do a search on two's complement. What you are looking for is not that difficult (I have kids to deal with now) but if you don't have it solved by tomorrow I will look up my notes. There is a simple trick of invert and add 1 or something similar as this is from memory.Experienced jumper - someone who has made mistakes more often than I have and lived. Quote Share this post Link to post Share on other sites
Psychonaut 0 #11 September 13, 2010 Yeah, I think the easy way for 10 is to find 9 and add 1, which I believe is also similar to one --> two'sStay high pull low Quote Share this post Link to post Share on other sites
Arvoitus 1 #12 September 13, 2010 1) -123 + (2^(12-1))-1 = 11110000100 2) 9999+-0123+1 = 9877Your rights end where my feelings begin. Quote Share this post Link to post Share on other sites
absane 0 #13 September 14, 2010 Oh.. is this a computer science problem? I had lost my interest in pretty much all thing computer-related after high school. University messed me up :(Don't forget to pull! Quote Share this post Link to post Share on other sites
happythoughts 0 #14 September 14, 2010 Handy stuff. I have used a date as a descending key by using 9's complement. (In case someone wants to see their most recent purchases, instead of stuff 2002.) Quote Share this post Link to post Share on other sites
theonlyski 3 #15 September 14, 2010 QuoteAnyone have any idea how to convert -123 the decimal to 1) Convert it to a 12-bit natural-biased binary number. 2) Convert it to a 4-digit 10's complement decimal number. A byte and a half?"I may be a dirty pirate hooker...but I'm not about to go stand on the corner." iluvtofly DPH -7, TDS 578, Muff 5153, SCR 14890 I'm an asshole, and I approve this message Quote Share this post Link to post Share on other sites
shropshire 0 #16 September 15, 2010 QuoteA byte and a half? Nope, not necessarily! 8 bits is an Octet but not always a Byte.. Depends upon the machine architecture. It's the atomic data storage size for a computer. A byte may be 9 bits on 36-bit computers. Some older architectures used "byte" for quantities of 6 or 7 bits, (.)Y(.) Chivalry is not dead; it only sleeps for want of work to do. - Jerome K Jerome Quote Share this post Link to post Share on other sites