Convert binary to decimal and decimal to binary