INTEGER ARITHMETIC
1. Language: C/C++
2. Requirement: Input two 8 bits signed integers called A and B. Solve the following
problems:
a. Get bits of A and B. Store to two bit arrays char arrA[8] and arrB[8] then print
out those two.
b. Write functions: add, subtract, multiply, divide of arrA and arrB
Output sample:
Input A (Decimal): 10
Input B (Decimal): 5
A (Binary): 00001010
B (Binary): 00000101
A + B (Binary): 00001111
A + B (Decimal): 15
A - B (Binary): 00000101
A - B (Decimal): 5
A * B (Binary): 00110010
A * B (Decimal): 50
A / B (Binary): 00000010
A / B (Decimal): 2
A % B (Binary): 00000000
A % B (Decimal): 0
3. Submission instructions
- Please submit your assignment to the Moodle
- The assignment will be compressed to a zip/rar file named MSSV.zip/rar that
includes two files:
o MSSV.c/cpp: Source code
o MSSV.docx/pdf:
▪ Screenshots of the program output (Unit Test)
▪ What percentage of the work is done?