import time
import machine
from machine import I2C, SoftI2C, Pin
from pico_i2c_lcd import I2cLcd
i2c = SoftI2C(sda=Pin(4), scl=Pin(7), freq=400000)
lcd_addr=i2c.scan()[0]
lcd=I2cLcd(i2c, lcd_addr, 2, 16)
lcd.move_to(0, 0)
num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))
num3=num1+num2
b1=bin(num1)
b2=bin(num2)
b3=bin(num3)
lcd.putstr("Firstnum in binary: ")
lcd.putstr(str(b1)[2:])
time.sleep(2)
lcd.clear()
lcd.putstr("Secondnum in binary: ")
lcd.putstr(str(b2)[2:])
time.sleep(2)
lcd.clear()
lcd.putstr("Sum(bin) ")
lcd.putstr(str(b3)[2:])
time.sleep(2)