Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Implicant

An implicant contains a set of one or more minterms. All minterms must be unique. The total number of minterms must be a power of two, e.g. 1, 2, 4, 8 etc.

export
class

Implicant

Hierarchy

  • Implicant

Index

Constructors

constructor

  • Creates an instance of Implicant. Must be given a set of minterms.

    memberof

    Implicant

    Parameters

    Returns Implicant

Properties

Protected minterms

minterms: Minterm[]

Methods

getCommonBits

  • getCommonBits(): number
  • Returns a number representing all the common set bits between all minterms in this implicant.

    example
    new Implicant(
      0b1110,
      0b0111
    ).getCommonBits() === 0b0110
    
    memberof

    Implicant

    Returns number

getMinterms

  • Get the array of minterms that make up this implicant.

    memberof

    Implicant

    Returns Minterm[]

getUncommonBits

  • getUncommonBits(): number
  • Returns a number representing all the uncommon bits between all minterms in this implicant.

    example
    new Implicant(
      0b1110,
      0b0111
    ).getUncommonBits() === 0b1001
    
    memberof

    Implicant

    Returns number

hasMinterm

  • hasMinterm(minterm: Minterm): boolean
  • Check if the given minterm is one of the minterms in this implicant.

    memberof

    Implicant

    Parameters

    Returns boolean

Static canCombine

  • Determine if two implicants can be combined. Will be true if there is only one differing bit between them -- either a set bit or an uncommon bit.

    static
    memberof

    Implicant

    Parameters

    Returns boolean

Static getCombinedImplicant

Static isEqual

  • Check if two implicants have the same set of minterms.

    static
    memberof

    Implicant

    Parameters

    Returns boolean

Generated using TypeDoc