•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 426,133 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,756 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 2689 | Replies: 4
![]() |
•
•
Join Date: Apr 2007
Posts: 17
Reputation:
Rep Power: 2
Solved Threads: 0
Hi,
I want to calculate 2's complement [ Negate all bits + 1] of BYTE array in c++ or VC++
firstly i am adding all elements of BYTE array and assigning it to integer variable now i want to calculate 2's complement of it. How can i do this plz help...
Does anyone know how to convert BYTE to binary format?
Thanks
Mukesh
I want to calculate 2's complement [ Negate all bits + 1] of BYTE array in c++ or VC++
firstly i am adding all elements of BYTE array and assigning it to integer variable now i want to calculate 2's complement of it. How can i do this plz help...
Does anyone know how to convert BYTE to binary format?
Thanks
Mukesh
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,174
Reputation:
Rep Power: 38
Solved Threads: 930
Last edited by Ancient Dragon : Apr 18th, 2007 at 5:30 am.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,174
Reputation:
Rep Power: 38
Solved Threads: 930
see my previous answer -- it contains a link
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
Join Date: Apr 2007
Posts: 17
Reputation:
Rep Power: 2
Solved Threads: 0
Thanks.
can we split the bits of byte data variable. what should i used for it... means which datatype to store the values
like A2 in hex as
162 in Dec
A2 in Binary
1010 0010
I want first 6 bit in one variable and last two in other. can i use shift operator? but how to use with bit ? plz help
Thanks again.
can we split the bits of byte data variable. what should i used for it... means which datatype to store the values
like A2 in hex as
162 in Dec
A2 in Binary
1010 0010
I want first 6 bit in one variable and last two in other. can i use shift operator? but how to use with bit ? plz help
Thanks again.
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Coverting a string to a byte array (Visual Basic 4 / 5 / 6)
- object stream and byte array conversion (Java)
- File parsing in 'C' (C)
Other Threads in the C++ Forum
- Previous Thread: problems in making loops
- Next Thread: questionaaire about tv watching habits



Linear Mode