|
Using the multi led
circuit we can now show how bitwise
operators work a bit easier know .
Source code
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
for(i=1;i<=7;i++)
{
_outp(0x378,0x01 << i);
_sleep(1000);
}
return 0;
}
Description
In the example we show
the usage of one of the bitwise operators
in C .
This example was compiled
in Visual C++ but should work in LCC
Win 32 and Dev C++ .
Download
bitwise1.txt
|