Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 1.6 KB

README.md

File metadata and controls

22 lines (17 loc) · 1.6 KB

PDNF_and_PCNF_generator

A perfect disjunctive normal form (PDNF) and a perfect conjunctive normal form (PCNF) for boolean functions generator. Functional:

  1. Generates a truth table for the N-number of arguments.
  2. Fills in the values of this table with a number in the binary code (if there is not enough / the binary code exceeds the required number, the correct quantity is set using the padding (zeros) / combing function (on the left side of the binary code)).
  3. Using the values of the table, generates PDNF and PCNF as a string.

You can quickly test the code on an online compiler, example here: https://www.onlinegdb.com/online_c++_compiler

//////////////////////////////////////// rus

«Совершенная дизъюнктивная нормальная форма (СДНФ) и совершенная конъюнктивная нормальная форма (СКНФ) для булевых функций». Функционал:

  1. Генерирует таблицу истинности для N-колисетва аргументов
  2. Заполняет значениями этой таблицы числом в бинарном коде (если не хватает/бинарный код превышает нужное количество, устанавливается корректное количество с помощью функции дополнения(нулями)/отчесения(с левой стороны бинарного кода))
  3. С помощью значений таблицы, генерирует СДНФ и СКНФ в качестве строки.