Coder Social home page Coder Social logo

varun508 / bitwise Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mellowcandle/bitwise

1.0 1.0 0.0 312 KB

Terminal based bitwise manipulator in curses

License: GNU General Public License v3.0

Makefile 1.00% C 92.78% Shell 0.26% M4 5.96%

bitwise's Introduction

bitwise (v0.13)

Terminal based bitwise calculator in curses

Build Statuscodecov Snap Status Coverity Scan Build Status

alt text

Usage

bitwise can be used both Interactively and in command line mode.

Command line mode

In command line mode, passing a number in any base (Decimal, Hexadecimal & Octal) will output the number in all bases including binary representation.

bitwise detects the base by the preface of the input (0x/0X for hexadecimal, leading 0 for octal, and the rest is decimal).

Example:

$ ./bitwise 0x12312311
Decimal: 305210129
Hexdecimal: 0x12312311
Octal: 02214221421
Size: 291.07MB
Binary:
0 0 0 1 0 0 1 0 | 0 0 1 1 0 0 0 1 | 0 0 1 0 0 0 1 1 | 0 0 0 1 0 0 0 1 
    31 - 24           23 - 16           15 -  8            7 -  0     

Interactive mode

bitwise starts in interactive mode if no command line parameters are passed or if the -i | --interactive flag is passed. In this mode, you can input a number and manipulate it and see the other bases change dynamically. It also allows changing individual bits in the binary.

Navigation in interactive mode

To move around use the arrow keys, or use vi key bindings : h j k l .

You can toggle a bit bit using the space key.

Reducing or extending the bit width interactively is also very easy, just use:

! for 8bit, @ for 16Bit, $ for 32Bit and * for 64Bit.

When changing the bit width, the number is masked with the new width, so you might lost precision, use with care.

Leave the program by pressing q .

Installation

Snap

If your distribution supports Snap just type: sudo snap install bitwise

Arch

Your can use the AUR repository: https://aur.archlinux.org/packages/bitwise/

Building from source

Make sure you have ncurses package installed

  1. Download latest release.
  2. unpack release
  3. ./configure
  4. make
  5. sudo make install

bitwise's People

Contributors

mellowcandle avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.