By using c++ to solve these questions, thanks :) activity 1. addition

 

By using C++ to solve these questions, thanks 🙂

Activity 1. Addition – part 1

Add 112 to the number 1110111010112. Transform your result into decimal.

Add 1110111010112 to the number 1110111010112. Transform your result back to decimal.

Activity 2. Subtraction

Subtract 112 from the number 1110111010112. Transform your result back to decimal.

Subtract 11101012 from the number 1110111010112. Transform your result back to decimal.

Activity 3. Shift right

Shift the number 1110111010112 right one position. Transform your result back to decimal. Transform the initial number back to decimal. What do you observe?

Activity 4. Shift left

Shift the number 1110111010112 left one position. Transform your result back to decimal. Transform the initial number to decimal. What do you observe?