DOCUMENTATION FOR QM.EXE (version 1.0) 
-------------------------------------- 
 
 
1.0 Introduction 
---------------- 
 
This program is designed to provide minimum solutions to 
multiple-input-single-output (MISO) logic problems of the 
standard or canonical form: 
 
f = SUM OF (fp1,fp2,fp3,.....) 
 
where the logic output, f, is the logical summation of 
the fundamental products, (fp1,fp2,fp3,...etc.). 
 
For problems of this type with less than 5 inputs, 
Karnaugh maps are usually used but for problems with more 
than 5 inputs a tabular solution method is more 
appropriate. This program employs the Quine-McCluskey 
tabular method to solve logic problems of the above type. 
 
It is assumed that the user is broadly familiar with the 
terminology and concepts of digital logic theory - a good 
exposition of which is given in: 
 
     Introduction to the Theory of Switching Circuits 
     by: E.J. McCluskey 
     McGraw-Hill, (1975). 
 
I suspect that this program may be of use to people 
studying or otherwise using digital logic theory at or 
beyond the level of HNC in Electrical Engineering. 
 
 
 
2.0 Using the Program 
--------------------- 
 
The program assumes the logic problem is given in 
standard decimal sum form: 
 
f = SUM OF (d1,d2,d3,d4,....etc) 
 
where d1,d2,...etc are decimal numbers representing 
the logical products of the binary inputs. 
 
For example, the logic function: 
 
  f=AB+CD'+AB'D  ,where D'= not D  etc., 
 
  can be put in standard form as follows: 
 
  f=AB+CD'+AB'D 
 
    by using the complementation theorem, 
 
   =AB(D+D')(C+C')+CD'(A+A')(B+B')+AB'D(C+C') 
   =AB(CD+C'D+CD'+C'D')+CD'(AB+AB'+A'B+A'B')+AB'CD+AB'C'D 
   =ABCD+ABC'D+ABCD'+ABC'D'+ABCD'+AB'CD'+A'BCD'+A'B'CD'+ 
    AB'CD+AB'C'D 
   =ABCD+ABC'D+ABCD'+ABC'D'+AB'CD'+A'BCD'+A'B'CD'+AB'CD+ 
    AB'C'D 
 
   =15+13+14+12+10+6+2+11+9 
 
  Thus, 
 
  f = SUM OF (2,6,9,10,11,12,13,14,15) is the canonical decimal 
  sum form of the original problem, f=AB+CD'+AB'D. 
 
The program can now be used to solve this problem. 
Firstly type qm at the DOS prompt (or double click on 
qm.exe in file manager if using windows) 
 
After the initial screen of information, you will be 
requested to enter the sequence of decimal numbers which 
represents your problem. If the program detects that 
the input sequence is for some reason invalid then you 
will be beeped and the input request field will be 
cleared allowing a fresh input sequence. 
 
After successfully entering the decimal input sequence 
you will be presented with a representation of the input 
function and then after each <Enter> the various lists 
associated with the Quine-McCluskey method.  Each list 
represents the results of one bit difference comparisons 
from within the previous list. Within each list the 
absence of a  indicates that the associated term is a 
prime implicant and is a candidate for inclusion in the 
eventual minimal logic solution (the absence of a  also 
indicates that the term has not been used in the 
construction of any succeeding list). 
 
After the list processing has proceeded to exhaustion, 
that is, after no further 1-bit difference comparisons 
and combinations can be made, then a list of all the 
detected prime implicants is displayed.  Any prime 
implicant (any row) within the list which is starred 
indicates the prime implicant is an essential prime 
implicant and must appear in any minimal solution 
whereas, any prime implicant which has a "d" next to it 
may be deleted from any minimal solution as it is 
"covered" by the essential prime implicants. The status 
of the remaining prime implicants is determined (if 
possible) by the reduction algorithm which is invoked on 
pressing <Return>. 
 
The reduction algorithm uses row and column dominance 
theorems (associated with prime implicant tables) 
successively until the problem is solved and the status 
of all the prime implicants is determined or until a 
cyclic prime implicant table condition is detected. 
The program cannot effect any further reductions once a 
cyclic condition has been detected - in this case a list 
of all the prime implicants is displayed and any 
reductions are indicated by: * =essential prime 
implicant, ** =secondary essential prime implicant, and 
d =prime implicant may be deleted. If a cyclic condition 
does arise during the reduction process, then you will 
have to use the given list of prime implicants and 
proceed manually. 
 
However, more often than not, the program does proceed to 
a minimal solution in which the status of all the prime 
implicants is resolved and indicated as follows: 
* =essential prime implicant, ** =secondary essential 
prime implicant, and  d =prime implicant may be deleted. 
 
Pressing <Return> gives a list of the prime implicants 
comprising the minimal logic in terms of the inputs 
ABCD...etc. which may be logically summed to give a (not 
necessarily unique) minimal logic function. 
 
Using the program on the above example, 
 
  f=AB+CD'+AB'D = SUM OF (2,6,9,10,11,12,13,14,15) 
 
  gives, 
 
  f=CD'+AD+AB 
 
  as a minimal solution. 
 
 
 
3.0 Program Limitations 
----------------------- 
 
The program uses long integers (32-bit) thus allowing, in 
principle, problems of around 30 inputs to be solved. 
 
The program allows any valid decimal input sequence to be 
entered up to a maximum of 500 characters. 
 
The program cannot produce a minimal solution to a 
problem if at any point in the reduction process the 
prime implicant table becomes cyclic. In this situation, 
the user will have to proceed manually. 
 
 
 
4.0 Author and Copyright 
------------------------ 
 
The author and copyright owner of this program is 
 
J.F. Douglas 
 
9 Cromer Court 
Barrington Close 
Liden 
SWINDON, SN3 6HQ.
U.K.

Tel: (01793) 432 884
Email: jfd@dpsl.co.uk


5.0 Distribution and Use
------------------------

This program is "FreeWare" and therefore may be used, 
copied, and distributed without restriction.
