7 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for Stefan_2

This is what I have to code. Input an array of numbers(any numbers that user inputs from standard input, aka keyboard), remove numbers from array that are not 0 and 1. Thay array should now be bitwise moved with << or >> (again user choses the number of spaces moved …

Member Avatar for Stefan_2
0
285
Member Avatar for Alexkid

Hi there, I have an array of unsigned chars that hold hex values, I’m interested in values [5] and [6] of the array. Say [5] = 0x5b = 0101 1011 and [6] = 0x7b = 0111 1011 I'm trying to get all of [5] and the first half of [6], …

Member Avatar for L7Sqr
0
191
Member Avatar for Dman01

Hi The following code shows good enough how to multiply two long data [CODE]long x = 10, y = 3; long p = 0; while (y > 0) { if ((y & 01) != 0) p += x; x <<= 1; y >>= 1; } std::cout << "\nResult : " …

Member Avatar for Dman01
0
666
Member Avatar for imolorhe

What are the possible uses of the bitwise operators. i.e. bitwise AND, bitwise OR, bitwise XOR, shift right, shift left and complement. Also, what are the applications of bitwise operators in everyday problem solving. Examples would be nice. Thanks in advance

Member Avatar for daddymummy
0
216
Member Avatar for kutuup

Hi, I'm working on an assignment where we have to have a client and server sending each other an integer that represents a noughts and crosses board. I had it working by simply sending back and forth the entire NoughtsAndCrosses class, but now we need to do it just using …

Member Avatar for kutuup
0
201
Member Avatar for batchprogram

I'm doing some homework for a computer systems class and all is well except this one problem that I can't seem to find a solution to due to the limitations. The problem requires me to write a function that performs addition on 32-bit signed integers but saturates the result to …

Member Avatar for rubberman
0
2K
Member Avatar for ashish101

Hello ppl, I have recently started C# and while going through initial pages of bitwise operators 1 doubt came into mind. v know dat int is of 32 bits in C#. Suppose i take a number and assign some value to it and then after left shifting it by 32,the …

Member Avatar for ashish101
0
195

The End.