Skip to content

Calculate the Hamming distance between two hex or binary values

License

Notifications You must be signed in to change notification settings

DePasqualeOrg/hamming-distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hamming distance

https://en.wikipedia.org/wiki/Hamming_distance

Installation

npm install @depasquale/hamming-distance

Usage

import hammingDistance from '@depasquale/hamming-distance';

const hDistBinary = hammingDistance('1111', '1110', 'binary');

// 'hex' is the default value and can be omitted.
const hDistHex = hammingDistance('ffff', 'fffe', 'hex');

About

Calculate the Hamming distance between two hex or binary values

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published