Program Console Vignaankosh.com
Execution Panel
Console is empty.
Program to demonstrate left shift and right shift is an interactive PYTHON dry run visualizer from the Io programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.
This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.
# Demonstrating shift operators
num = int(input("Enter a number: "))
print(f"\nOriginal: {num} (Binary: {bin(num)})")
print(f"Left shift by 1: {num << 1} (Multiply by 2)")
print(f"Left shift by 2: {num << 2} (Multiply by 4)")
print(f"Right shift by 1: {num >> 1} (Divide by 2)")
print(f"Right shift by 2: {num >> 2} (Divide by 4)")