← Back to Course

Lesson 31: Downcasting

Practice Questions

Question 1: We want to cast a `uint128` into a `uint32`. What is the maximum value the `uint128` variable can hold before the cast results in lost bits?

Question 2: We want to cast a `uint96` into a `uint8`. What is the maximum value the `uint96` variable can hold before the cast results in lost bits?

Question 3: We want to cast a `uint256` into a `uint128`. What is the maximum value the `uint256` variable can hold before the cast results in lost bits?

Question 4: We want to cast a `uint112` into a `uint80`. What is the maximum value the `uint112` variable can hold before the cast results in lost bits?

Question 5: We want to cast a `uint200` to a `uint192`. What is the maximum value the `uint200` variable can hold before the cast results in lost bits?