//亲测可用
#include "stdafx.h"
#include <stdlib.h>
#include <iostream>
#include <bitset>
using namespace std;
//unsigned long long Data;
unsigned int Data;
int ID[8] = {0,1,0,1,1,0,1,0};
int main()
{
int i;
//char s[100];
Data = ID[0];
for (i = 1; i < 8; i++)
{
Data = (Data << 1) | ID[i];
}
bitset<64>myset = Data;
cout << myset << endl;
printf("Data:%x\n", Data);
system("pause");
return 0;
}