boolean_algebra.karnaugh_map_simplification

https://en.wikipedia.org/wiki/Karnaugh_map https://www.allaboutcircuits.com/technical-articles/karnaugh-map-boolean-algebraic-simplification-technique

Functions

main(→ None)

Main function to create and simplify a K-Map.

simplify_kmap(→ str)

Simplify the Karnaugh map.

Module Contents

boolean_algebra.karnaugh_map_simplification.main() None

Main function to create and simplify a K-Map.

>>> main()
[0, 1]
[1, 1]
Simplified Expression:
A'B + AB' + AB
boolean_algebra.karnaugh_map_simplification.simplify_kmap(kmap: list[list[int]]) str

Simplify the Karnaugh map. >>> simplify_kmap(kmap=[[0, 1], [1, 1]]) “A’B + AB’ + AB” >>> simplify_kmap(kmap=[[0, 0], [0, 0]]) ‘’ >>> simplify_kmap(kmap=[[0, 1], [1, -1]]) “A’B + AB’ + AB” >>> simplify_kmap(kmap=[[0, 1], [1, 2]]) “A’B + AB’ + AB” >>> simplify_kmap(kmap=[[0, 1], [1, 1.1]]) “A’B + AB’ + AB” >>> simplify_kmap(kmap=[[0, 1], [1, ‘a’]]) “A’B + AB’ + AB”