thanks for that..works perfectly.
Type: Posts; User: n00bcodezor
thanks for that..works perfectly.
ok, im trying to write a function that does a "circular shift" i.e: left shifts "a" by "n" positions, where high order bits are introduced as low order bits.
eg:
10000001 circular shift 1...
thanks for that explanation sayeh, i understand it all now.
thanks for that ozgulker.
works like a charm
ok here is my modification of his code (but it still doesnt work :D)
anyone care to debug it for me?
#include <stdio.h>
int main()
{
unsigned long newlong;
unsigned long...
sayeh, what exactly do the lines
scratch <<= ((7-i)*4);
newlong &= scratch;
do in the code you wrote in your reply?
How do I pack 8 4-bit binary numbers into a long int?
The program is to take an input string of 8 ascii charcaters, (digits 0 to 9 only), convert them to their 4 bit binary equivilants and pack them...