Difference between onehot and binary encoding?

All queries related to number system, flip-flops, logic designs and CMOS based digital circuits.
Post Reply
Netrapal
Posts: 19
Joined: Sat May 10, 2014 10:26 pm
Location: Gurgaon, India

Difference between onehot and binary encoding?

Post by Netrapal » Sat May 10, 2014 10:53 pm

Difference between onehot and binary encoding?

User avatar
Narveer
Posts: 59
Joined: Tue Apr 08, 2014 11:29 am
Location: Bangalore, INDIA

Re: Difference between onehot and binary encoding?

Post by Narveer » Sun May 11, 2014 11:39 am

Common classifications used to describe the state encoding of an FSM are Binary (or highly encoded) and One hot.
A binary-encoded FSM design only requires as many flip-flops as are needed to uniquely encode the number of states in the state machine. The actual number of
flip-flops required is equal to the ceiling of the log-base-2 of the number of states in the FSM.

A onehot FSM design requires a flip-flop for each state in the design and only one flip-flop (the flip-flop representing the current or "hot" state) is set at a time in
a one hot FSM design. For a state machine with 9- 16 states, a binary FSM only requires 4 flip-flops while a onehot FSM requires a flip-flop for each state in the design.

FPGA vendors frequently recommend using a onehot state encoding style because flip-flops are plentiful in an FPGA and the combinational logic required to implement a onehot FSM design is typically smaller than most binary encoding styles. Since FPGA performance is typically related to the combinational logic size of the FPGA design, onehot FSMs typically run faster than a binary encoded. FSM with larger combinational logic blocks.

Post Reply