Introduction
Number systems are ways of representing numbers using different symbols and mathematical operations. Converting between different number systems is a common task in programming. In this lab, we will showcase programs that can convert numbers from one system to another. We will cover:
- Binary to Decimal Conversion
- Octal to Decimal Conversion
- Decimal to Binary Conversion (without recursion)
- Decimal to Binary Conversion (with recursion)
Note: You need to create the file
~/project/main.c
yourself to practice coding and learn how to compile and run it using gcc.
cd ~/project
## create main.c
touch main.c
## compile main.c
gcc main.c -o main
## run main
./main