Digital Logic: What are “hamming code” and “Binary code” state machines?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I'm asked to draw the circuit for a state machine in one hot, hamming code and binary code models. I know what is one hot state machine, but i'm not sure what are the other 2. Google also didn't help. Any ideas?










share|improve this question





















  • examine the work of Richard Hamming.
    – analogsystemsrf
    46 mins ago














up vote
1
down vote

favorite












I'm asked to draw the circuit for a state machine in one hot, hamming code and binary code models. I know what is one hot state machine, but i'm not sure what are the other 2. Google also didn't help. Any ideas?










share|improve this question





















  • examine the work of Richard Hamming.
    – analogsystemsrf
    46 mins ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm asked to draw the circuit for a state machine in one hot, hamming code and binary code models. I know what is one hot state machine, but i'm not sure what are the other 2. Google also didn't help. Any ideas?










share|improve this question













I'm asked to draw the circuit for a state machine in one hot, hamming code and binary code models. I know what is one hot state machine, but i'm not sure what are the other 2. Google also didn't help. Any ideas?







digital-logic flipflop state-machines






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 6 hours ago









Ju Bc

1375




1375











  • examine the work of Richard Hamming.
    – analogsystemsrf
    46 mins ago
















  • examine the work of Richard Hamming.
    – analogsystemsrf
    46 mins ago















examine the work of Richard Hamming.
– analogsystemsrf
46 mins ago




examine the work of Richard Hamming.
– analogsystemsrf
46 mins ago










1 Answer
1






active

oldest

votes

















up vote
5
down vote



accepted










If you have a state machine with N states, there are a number of different ways to encode those states as binary logic.



  • One-hot encoding assigns one FF to each state, so it requires N FFs. Only one FF has the value 1 (is "hot") at a time. If at any time, more than one FF is 1, that's an error.


  • Binary encoding assigns sequential integers to the states, and they get encoded on $lceillog_2 Nrceil$ FFs as unsigned binary numbers.


  • Hamming encoding is similar to binary encoding, except that enough additional FFs are added so that the state assignments are Hamming codes that are capable of correcting single-bit errors and detecting double-bit errors. An error detector monitoring the state values can determine that an error has occurred and correct it. If the binary encoding requires $M = lceillog_2 Nrceil$ FFs, then the Hamming encoding requires an additional $lceillog_2 Mrceil + 1$ FFs.






share|improve this answer




















  • Addendum: Vendors of synthesis software (Xilinx Vivado, Intel Quartus, Synopsys Simplify, ...) are offering additional encodings like gray code, sequential, ... These codes depend on the number of states and the layout of the state transition graph. Tools might explore different encodings to choose the "best" encoding with regards to area (resources) and speed (timing).
    – Paebbels
    20 mins ago











Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
);
);
, "mathjax-editing");

StackExchange.ifUsing("editor", function ()
return StackExchange.using("schematics", function ()
StackExchange.schematics.init();
);
, "cicuitlab");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "135"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f402254%2fdigital-logic-what-are-hamming-code-and-binary-code-state-machines%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
5
down vote



accepted










If you have a state machine with N states, there are a number of different ways to encode those states as binary logic.



  • One-hot encoding assigns one FF to each state, so it requires N FFs. Only one FF has the value 1 (is "hot") at a time. If at any time, more than one FF is 1, that's an error.


  • Binary encoding assigns sequential integers to the states, and they get encoded on $lceillog_2 Nrceil$ FFs as unsigned binary numbers.


  • Hamming encoding is similar to binary encoding, except that enough additional FFs are added so that the state assignments are Hamming codes that are capable of correcting single-bit errors and detecting double-bit errors. An error detector monitoring the state values can determine that an error has occurred and correct it. If the binary encoding requires $M = lceillog_2 Nrceil$ FFs, then the Hamming encoding requires an additional $lceillog_2 Mrceil + 1$ FFs.






share|improve this answer




















  • Addendum: Vendors of synthesis software (Xilinx Vivado, Intel Quartus, Synopsys Simplify, ...) are offering additional encodings like gray code, sequential, ... These codes depend on the number of states and the layout of the state transition graph. Tools might explore different encodings to choose the "best" encoding with regards to area (resources) and speed (timing).
    – Paebbels
    20 mins ago















up vote
5
down vote



accepted










If you have a state machine with N states, there are a number of different ways to encode those states as binary logic.



  • One-hot encoding assigns one FF to each state, so it requires N FFs. Only one FF has the value 1 (is "hot") at a time. If at any time, more than one FF is 1, that's an error.


  • Binary encoding assigns sequential integers to the states, and they get encoded on $lceillog_2 Nrceil$ FFs as unsigned binary numbers.


  • Hamming encoding is similar to binary encoding, except that enough additional FFs are added so that the state assignments are Hamming codes that are capable of correcting single-bit errors and detecting double-bit errors. An error detector monitoring the state values can determine that an error has occurred and correct it. If the binary encoding requires $M = lceillog_2 Nrceil$ FFs, then the Hamming encoding requires an additional $lceillog_2 Mrceil + 1$ FFs.






share|improve this answer




















  • Addendum: Vendors of synthesis software (Xilinx Vivado, Intel Quartus, Synopsys Simplify, ...) are offering additional encodings like gray code, sequential, ... These codes depend on the number of states and the layout of the state transition graph. Tools might explore different encodings to choose the "best" encoding with regards to area (resources) and speed (timing).
    – Paebbels
    20 mins ago













up vote
5
down vote



accepted







up vote
5
down vote



accepted






If you have a state machine with N states, there are a number of different ways to encode those states as binary logic.



  • One-hot encoding assigns one FF to each state, so it requires N FFs. Only one FF has the value 1 (is "hot") at a time. If at any time, more than one FF is 1, that's an error.


  • Binary encoding assigns sequential integers to the states, and they get encoded on $lceillog_2 Nrceil$ FFs as unsigned binary numbers.


  • Hamming encoding is similar to binary encoding, except that enough additional FFs are added so that the state assignments are Hamming codes that are capable of correcting single-bit errors and detecting double-bit errors. An error detector monitoring the state values can determine that an error has occurred and correct it. If the binary encoding requires $M = lceillog_2 Nrceil$ FFs, then the Hamming encoding requires an additional $lceillog_2 Mrceil + 1$ FFs.






share|improve this answer












If you have a state machine with N states, there are a number of different ways to encode those states as binary logic.



  • One-hot encoding assigns one FF to each state, so it requires N FFs. Only one FF has the value 1 (is "hot") at a time. If at any time, more than one FF is 1, that's an error.


  • Binary encoding assigns sequential integers to the states, and they get encoded on $lceillog_2 Nrceil$ FFs as unsigned binary numbers.


  • Hamming encoding is similar to binary encoding, except that enough additional FFs are added so that the state assignments are Hamming codes that are capable of correcting single-bit errors and detecting double-bit errors. An error detector monitoring the state values can determine that an error has occurred and correct it. If the binary encoding requires $M = lceillog_2 Nrceil$ FFs, then the Hamming encoding requires an additional $lceillog_2 Mrceil + 1$ FFs.







share|improve this answer












share|improve this answer



share|improve this answer










answered 6 hours ago









Dave Tweed♦

113k9136243




113k9136243











  • Addendum: Vendors of synthesis software (Xilinx Vivado, Intel Quartus, Synopsys Simplify, ...) are offering additional encodings like gray code, sequential, ... These codes depend on the number of states and the layout of the state transition graph. Tools might explore different encodings to choose the "best" encoding with regards to area (resources) and speed (timing).
    – Paebbels
    20 mins ago

















  • Addendum: Vendors of synthesis software (Xilinx Vivado, Intel Quartus, Synopsys Simplify, ...) are offering additional encodings like gray code, sequential, ... These codes depend on the number of states and the layout of the state transition graph. Tools might explore different encodings to choose the "best" encoding with regards to area (resources) and speed (timing).
    – Paebbels
    20 mins ago
















Addendum: Vendors of synthesis software (Xilinx Vivado, Intel Quartus, Synopsys Simplify, ...) are offering additional encodings like gray code, sequential, ... These codes depend on the number of states and the layout of the state transition graph. Tools might explore different encodings to choose the "best" encoding with regards to area (resources) and speed (timing).
– Paebbels
20 mins ago





Addendum: Vendors of synthesis software (Xilinx Vivado, Intel Quartus, Synopsys Simplify, ...) are offering additional encodings like gray code, sequential, ... These codes depend on the number of states and the layout of the state transition graph. Tools might explore different encodings to choose the "best" encoding with regards to area (resources) and speed (timing).
– Paebbels
20 mins ago


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f402254%2fdigital-logic-what-are-hamming-code-and-binary-code-state-machines%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

Long meetings (6-7 hours a day): Being “babysat” by supervisor

What does second last employer means? [closed]

One-line joke