Can u help me in making a C++ code for simulating a bidirectional shift register??????

Recommended Answers

All 3 Replies

Do you mean the assembly instructions rshit and lshift? The C equivalent are << and >> operators

int a = 123;
int b = a << 1; // left shift by 1

Can u help me in making a C++ code for simulating a bidirectional shift register??????

its so easy varun...if u cant make this simple programme, u might think of leaving programming...
Shell out something from ur brain, n develop this simple code...v r not here to make ur assignments..!

Can u help me in making a C++ code for simulating a bidirectional shift register??????

May be you want C++ code for SHIFT AND ROTATE instructions?
If so it is then combine << >> (shifts) & (bitwise and) | (bitwise or) operators - it's so simple ;)...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.