Binary Number System Homework: Counting 1s in 162*9+162*7+16*5+3

  • Thread starter Thread starter RajChakrabrty
  • Start date Start date
  • Tags Tags
    Binary System
AI Thread Summary
The discussion revolves around calculating the number of 1s in the binary representation of the expression 162*9+162*7+16*5+3. Participants highlight that simplifying the expression to 167*16+5 makes it easier to convert to hexadecimal and then binary. A key insight is that since all products involve even numbers, the overall sum is even, which affects the binary representation's least significant bit. There is some confusion about whether the task is to find the number of 1s or just the value of the least significant bit. Ultimately, the focus is on understanding the binary representation rather than performing extensive calculations.
RajChakrabrty
Messages
27
Reaction score
0

Homework Statement



Number of 1 in the binary representation of the expression 162*9+162*7+16*5+3

Homework Equations





The Attempt at a Solution



obviously, anyone can add these numbers up and then convert to binary
but what is the actual procedure for this type of format?
 
Physics news on Phys.org
Notice that 162*9+162*7+16*5+3 can be rewritten as 162*16+16*5+3=167*16+5. Converting this to hexademical, then to binary, should be much easier than computing the decimal result and converting that to binary.
 
wonderful.
Thanks a lot.
 
UH ... I think you've missed the point here. The solution is obvious without doing ANY calcs.

Just notice that each of the products has an even term in it, and the product of any even integer with ANY integer is an even number, so you have the sum of 3 even numbers and THAT is an even number, so what's the low-order bit in a binary representation of ANY even number? I think that's the point of the exercise because if you understand that, then the answer is trivial.
 
I read this problem statement as "Find the number of ones in the binary representation..."--not "what is the value of the LSB". Maybe OP can clarify.
 
lewando said:
I read this problem statement as "Find the number of ones in the binary representation..."--not "what is the value of the LSB". Maybe OP can clarify.

Yeah, now you mention it and I re-read it, I see your point. I just glossed over the problem statement so quickly that my brain said "value of the 1 bit", which is NOT, as you point out, quite what it says and your interpretation seems more likely.
 
Thread 'Have I solved this structural engineering equation correctly?'
Hi all, I have a structural engineering book from 1979. I am trying to follow it as best as I can. I have come to a formula that calculates the rotations in radians at the rigid joint that requires an iterative procedure. This equation comes in the form of: $$ x_i = \frac {Q_ih_i + Q_{i+1}h_{i+1}}{4K} + \frac {C}{K}x_{i-1} + \frac {C}{K}x_{i+1} $$ Where: ## Q ## is the horizontal storey shear ## h ## is the storey height ## K = (6G_i + C_i + C_{i+1}) ## ## G = \frac {I_g}{h} ## ## C...
Back
Top