# Binary Programmer Needed for Tutoring



## conneich (Mar 2, 2012)

Hello all,

Im taking a course in Computer Systems for Programmers, and in our first week we started off with binary and hexadecimal programming. I'm familiar with C/C++, but as for binary programming Im completely lost. I'd like someone to talk with thats familiar with these problems, if theres anyone out there.

--Conneich


----------



## LizardKing (Mar 2, 2012)

Do you mean assembly or what?


----------



## conneich (Mar 2, 2012)

C++, the class is using C++ for the programming not Assembly.


----------



## Sai_Wolf (Mar 2, 2012)

conneich said:


> Hello all,
> 
> Im taking a course in Computer Systems for Programmers, and in our first week we started off with binary and hexadecimal programming. I'm familiar with C/C++, but as for binary programming Im completely lost. I'd like someone to talk with thats familiar with these problems, if theres anyone out there.
> 
> --Conneich



Do you mean you started off with binary and hexadecimal _concepts_? They're both handy to know for C and C++. C is more of a low level language with C++ being a higher level (Levels relative to interaction with the underlying OS and hardware).

http://www.codemastershawn.com/library/tutorial/hex.bin.numbers.php seems to be a good concept on both Binary and hexadecimal. If you're looking for a book on the subject of C/C++, then O'Reilly's got you covered.


----------



## Stratto the Hawk (Mar 2, 2012)

Er, nobody really ever programs in binary. Are you doing microcoding for a specialized processor or what? I'm confused because you say it's a class on C++ but you're asking about binary programming. Could you be more specific or detailed in what exactly it is that you need help with?


----------



## LizardKing (Mar 2, 2012)

Another thought: Do you mean bitwise manipulation in C++? E.g. x = ((y & 0xF0) | 1) << 2;


----------



## conneich (Mar 2, 2012)

Bitwise Manipulation is the best way of putting. Like I said Ive never used it, I knew it existed but never formally taught it so I didnt even know what to call it. Here's sme of the questions I have for homework. I dont want the answers to them sepcifically, I just want help "understanding" how to GET those answers.

Write C expressions that evaluate to 1 when the following conditions are true, and to 0 when they are false. Assume x is of type int.

A. Any bit of x equals 1.
B. Any bit of x equals 0.
C. Any bit in the least significant byte of x equals 1.
D. Any bit in the most significant byte of x equals 0.

The restrictions are I cannot use in/equality (== !=), cannot use traditional if statements, nor ?: conditionals. It must be bitwise operators.

I figure A's answer is x & 1, but then I try x & 0, and get all 0s for answers, even though one of the variables is just int x3 = 0;


----------

