HW1 HW2 HW3

`format: [decimal number] '\t' [binary number] '\t' [hexadecimal number] '\n'`

sample: 108 1101100B 6CH

82

91

13

55

` format: [hexadecimal number] '\t' [binary number] '\t' [decimal number] '\n'`

sample: ABH 10101011B 171

F3H

3C5H

191H

47H

` format: [hexadecimal number] '\t' [base-7 number] '\n'`

sample: ACH 334

6AH

4CH

56H

30H

` format: [decimal number] '\t' [8-bit 2's complement signed representation] '\n'`

` format: [decimal number] '\t' [8-bit 1's complement signed representation] '\n'`

Tasks 2.3 and 2.4 are not part of this homework anymore - floating point number representation will be covered later in the course.

`1 0111 1100 010 0000 0000 0000 0000 0000`

.`1 0000 0000 001 1000 0000 0000 0000 0000`

.This part of homework will be graded by hand.

3 non-negative integers A, B and N are given, from these numbers you will get a sequence A+B, A+B*2,…,A+B*N .

Every element in the sequence is regarded as binary number. Your program should output how many bits are false in the sequence, assuming 64bit unsigned integers.

0<=A,B,N<=1e6

`A B N`

`[output the answer in a decimal number]`

`8 5 2`

`123`

- Note that this program must be written in C! Please submit your source file called
`task3.c`

and Makefile in a folder called`task3`

. Executable file should be called`task3`

and also placed in the folder called`task3`

.

- Your program has to be compiled using
`gcc -Wpedantic -Wall -Wextra -Werror -std=c89`

.

- Write comments for your code!

- The gradebot will open on Friday, March 3rd.