Skip to main content

Convert two's complement integer to gray code and vice versa

Project description

# Gray codes for Python

## Introduction

Library functions to convert gray code to two’s complement integer and vice versa in Python 3.

See LICENSE.md for copyright information. This library is licensed under the MIT license.

See https://en.wikipedia.org/wiki/Gray_code for details about gray codes.

## Example

import graycode

graycode.tc_to_gray_code(2) # => 3 graycode.gray_code_to_tc(3) # => 2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for graycode, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size graycode-1.0.3-py3-none-any.whl (4.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size graycode-1.0.3.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page