Skip to main content

BCDDisplay

BCDDisplay

A representation of a BCD Display, which takes a Binary Coded Decimal input from 4 input ports and uses a segmented display to represent the value of the input in hexadecimal.


Constructor

public BCDDisplay

new BCDDisplay()

Initializes a BCD Display with 4 input ports.


Properties

No publicly accessible properties on BCDDisplay


Methods

public isSegmentOn

isSegmentOn(segment) => false | true

Given a specific segment, returns true if that segment should be on, accoring to the input ports.

Parameters

  •  segment: number – The index of a segment.

Returns

  •   false | true – True if the segment is on, false otherwise.

public getDisplayName

getDisplayName() => string

Gets the display name of the BCD Display which includes the number of segments it has.

Returns

  •   string – The display name.

Static Methods

No static methods for BCDDisplay