added sizeof to circ shift

This commit is contained in:
Christoph J. Scherr 2023-04-25 11:56:11 +02:00
parent 3b383cebe4
commit 367f5a3aab
Signed by: PlexSheep
GPG Key ID: 25B4ACF7D88186CC
1 changed files with 2 additions and 1 deletions

View File

@ -37,9 +37,10 @@ uint32_t main(int* argc, char** argv) {
uint32_t shift_width;
sscanf(argv[1], "%d", &x);
sscanf(argv[2], "%d", &shift_width);
printf("shift width:\t%d\n", shift_width);
uint32_t rotr = rotr32(x, shift_width);
uint32_t rotl = rotl32(x, shift_width);
printf("shift width: %d\n", shift_width);
printf("sizeof x: %d\n", sizeof(x));
printf("original: 0b%032b | 0x%08x | %u\n", x, x, x, x);
printf("rshifted: 0b%032b | 0x%08x | %u\n", rotr, rotr, rotr, rotr);
printf("lshifted: 0b%032b | 0x%08x | %u\n", rotl, rotl, rotl, rotl);