Skip to main content
2 votes
3 answers
184 views

The following derives from this question but is distinct Consider the following code sample; uint32_t *value = malloc(sizeof(uint32_t)); *value = 0xAAAABBBB; int16_t *subset = (int16_t*) (value); ...
Nil A Curious Programmer's user avatar
2 votes
2 answers
223 views

I am trying to solve the problem posed in this question which asks that division of two numbers be performed in a bitwise manner. So, I wrote the following functions. sum() adds two numbers. larger() ...
uran42's user avatar
  • 469
5 votes
3 answers
285 views

I am trying to write a computer programme that will take two numbers from the user as inputs and will print the bigger number using bitwise operation. I want it to end the programme and return 1 if ...
uran42's user avatar
  • 469
0 votes
0 answers
28 views

Given a number with a width of n bits representing a signed number in two's complement, what is the minimal number of bits that need to be checked and which ones, in order to know whether there will ...
Ranar 100's user avatar
4 votes
2 answers
252 views

This code doesn't compile. It seems like the compiler (VS) is interpreting the expression as: (std::cout << ul1) & (ul2 << std::endl) #include <iostream> int main() { ...
user8683582's user avatar
-1 votes
1 answer
57 views

So I'm practicing disassembling on an C program that checks if the user given serial number fulfills the requirements. The program manually checks each character from the serial number, executing the ...
TasH's user avatar
  • 13
-2 votes
1 answer
37 views

I have a field containing an int that represents flags 0 = No error 1 = Error 1 2 = Error 2 4 = Error 3 8 = Error 4 so if I have a value of 5, I know it is Error 1 and Error 3 I need to add custom ...
mark1234's user avatar
  • 1,117
-2 votes
1 answer
98 views

I am solving a problem that requires O(1) space complexity to check for duplicate numbers. I wanted to use a hash table, but due to the O(1) space constraint, I used bitwise operations. However, I ...
459zyt's user avatar
  • 115

15 30 50 per page
1
2 3 4 5
208