/MacrosAndBits

The program utilizes predefined macros and logic to simplify bit manipulation operations, making it a handy tool for visualizing and manipulating binary data.

Primary LanguageC

Macros and Bits

C License

Table of Contents

Description

Designed to perform binary bit manipulation on an integer. It provides a menu-driven interface that allows the user to toggle, set, or clear individual bits within an integer. Additionally, it can display the binary representation of the integer and the integer value itself.

The program utilizes predefined macros and logic to simplify bit manipulation operations, making it a handy tool for visualizing and manipulating binary data.

Prerequisites

Before running the application, you'll need to have the following installed:

A C compiler (e.g., GCC) Standard C libraries

Usage

  1. Clone the repository:

    git clone https://github.com/Zabraniak/MacrosAndBits.git
    
  2. Compile the C program:

    gcc -o binary_manipulation main.c
    
  3. Run the program:

    ./binary_manipulation
    
  4. Follow the on-screen instructions to provide an integer input and select bit manipulation options. The program will guide you through the process of toggling, setting, clearing bits, and displaying binary representations.

  5. Exit the program by selecting the appropriate option in the menu.

Screenshots

TOGGLE SET
MacrosAndBitsTOGGLE MacrosAndBitsSET
CLEAR SHOW
MacrosAndBitsCLEAR MacrosAndBitsSHOW

Contributing

Contributions are welcome! If you have any improvements or new features to add, feel free to fork this repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License.

Info

This project can help people understand how bits: setting/clearing/toggling works or how a number can be described by a binary system. It uses macros to do almost everything - it's not necessary but it was more interesting to implement it this way. The nice addition is a loading bar that imitates the "processing" progress.