Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Convert decimal to binary
Name: mirdula Date: February 6, 2009 at 11:53:32 Pacific OS: Windows XP Subcategory: C/C++
Comment:
I need to write a function in C++ to convert a decimal integer to an eight-bit two’s complement binary number. Use binNum[0] to store the most significant bit and binNum[7] to store the least significant bit. I know how to convert decimal integer into binary number but I can not do it right with two's complement .Please can somebody help with it.
Summary: I have never used VB, and I know Java has some methods to make this much faster, but assuming you have to do it all by yourself, you would get the string in the text box, take the first character, and...
Summary: Converting to binary from decimal works like this: First convert the integer part (35 in the above case - 100011 Then convert the decimal part by multiplying it (.375) by two and recording the integer...