Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer logic coursework helpers

Small CommonJS modules created for educational exercises in computer logic, coding theory, and numeral systems. They operate only on values supplied by the caller: there is no network access, credential handling, filesystem mutation, or external-service integration.

Modules

  • base_converts.js — non-negative decimal/hexadecimal fractional conversions with fixed output precision, plus modular residues and tetrad/triad helpers.
  • calc.js — course-variant-weighted entropy/average length, prime factorization, and threshold selection.
  • string_manip.js — Ukrainian variant-table lookup and letter/code-pair helpers.
  • shannon_fano_code.js — assignment-specific Shannon–Fano codes using variant-table weights.
  • hamming_code.js — Hamming(21,16) encoding and single-bit error syndrome calculation. Misspelled historical exports remain as aliases.
  • FAL.js — monotonicity, affine-linearity, self-duality, and Post-class checks for three-variable truth tables.
  • FAL_minimisation.js — experimental three-variable Boolean minimization and formula-term comparison.
  • 3.1ElementsCount.js — assignment-specific Boolean-basis element counting.
  • main.js — a local, deterministic usage demonstration.

Truth tables use input order 000, 001, …, 111 and may be supplied as eight binary digits or two hexadecimal digits where documented. Invalid structured inputs throw rather than silently producing NaN.

Run and test

Node.js 18 or newer is sufficient; there are no package dependencies.

node src/main.js
npm test

Tests cover deterministic conversions, known Boolean functions, formula comparison, Shannon–Fano prefix behavior, and all 21 possible single-bit errors in generated Hamming codewords.

Status and reuse

These are narrow coursework helpers, not a general-purpose logic or error-correction library. Results should be checked against the course's conventions before academic use.

No software license has been granted: repository history contains contributions from several authors and does not establish agreement on a common license. The bundled university course guide is third-party reference material and is not offered for reuse by this repository; see docs/README.md.

About

Educational JavaScript helpers for computer logic and coding theory

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages