Hardware Engineering

Hardware Engineering

Saintanik Sep 30, 2016 @ 10:41pm
Question about MSB/LSB
When we write a binary number, we might say '0010' to mean decimal '2', i.e. the MSB is on the left, and the LSB is on the right.. but it seems that the components work the other way around, and the LSB is on the left, and the MSB on the right.. which is a little confusing.

e.g. the truth table for the decoder is listed in this order:
00
10
01
11

Is that just the way electrical components are made?
< >
Showing 1-12 of 12 comments
lex  [developer] Sep 30, 2016 @ 10:49pm 
It all depends on notation used.

Regarding the outputs, it doesn't matter in what order they are listed, but what meaning are they assigned. So,we could even list the outputs randomly, like 1st 3rd 0th 2nd, but if 0th bit was LSB and 3rd MSB, it would not matter.
Last edited by lex; Sep 30, 2016 @ 10:52pm
lex  [developer] Sep 30, 2016 @ 10:55pm 
Notice
Originally posted by The most amazing description ever written:
A truth table for 2-to-4 decoder is below (LSB-first):

We have chosen to list the table in this manner because there is no difference in significance of the output bits. So the combination 01 -> ...


Alright, alright, I will change it back ... to something more intuitive.
Last edited by lex; Sep 30, 2016 @ 11:03pm
Chook Fowler Sep 30, 2016 @ 11:19pm 
Originally posted by Saintanik:
When we write a binary number, we might say '0010' to mean decimal '2', i.e. the MSB is on the left, and the LSB is on the right.. but it seems that the components work the other way around.

I initially thought this too, but they are aligned so that they match the inputs of the other components (ie 4 way adder etc), although the IO window also seems to display it backwards too and that IS confusing.
lex  [developer] Sep 30, 2016 @ 11:26pm 
yup :/ this design choice has been made a long time ago
Saintanik Sep 30, 2016 @ 11:48pm 
yeah, it's not something that can be changed now, even if you could, it would ruin everyone's saved circuits.

just disconcerting when you're debugging a circuit.. if the input says 1011 in the simulator box, it will show up as green green red green, so you have to flip it around in your head is all.
lex  [developer] Oct 1, 2016 @ 2:27am 
Do you all think it'd be better if we started displaying numbers in the output window with "MSB to the right"?

It's just a matter of inverting the display loop, AFAIK, so we can try it.
lex  [developer] Oct 1, 2016 @ 3:09am 
OK, noted. It might take some time.

Meanwhile, it is always possible to hover over the output in I/O window and see the individual bits with their indices.
Saintanik Oct 1, 2016 @ 5:32pm 
Originally posted by lexected:
Do you all think it'd be better if we started displaying numbers in the output window with "MSB to the right"?

Personaly, I would prefer this, so that what you're seeing in the I/O window matches what you are seeing come through your componentry..

As most of the time the inputs are just streams of 1's and 0's it shouldnt make any difference.. except for when the input actually represents a number (such as the selector in the ALU) .. then it could get confusing.

So... hard to say really.. I havent done any levels past ALU yet so I dont know how often inputs need to be read as an actual binary number.. if it happens often, then best to leave it as it is.
Chook Fowler Oct 1, 2016 @ 6:37pm 
Originally posted by Saintanik:
Personaly, I would prefer this, so that what you're seeing in the I/O window matches what you are seeing come through your componentry..

100% agree.
lex  [developer] Oct 1, 2016 @ 10:29pm 
Originally posted by Saintanik:
...

So... hard to say really.. I havent done any levels past ALU yet so I dont know how often inputs need to be read as an actual binary number.. if it happens often, then best to leave it as it is.

That's what concerns us - the programming levels practically require it to be a normal binary number...
Saintanik Oct 2, 2016 @ 4:22am 
Originally posted by lexected:


That's what concerns us - the programming levels practically require it to be a normal binary number...

In that case, might be best to leave it alone.. having binary numbers written backwards in the I/O screen would be really annoying.

I'm geting used to just working in the other direction when looking at my components.. it's not the end of the world if it is left as it is ;)
Last edited by Saintanik; Oct 2, 2016 @ 4:22am
Jjin Oct 4, 2016 @ 5:05am 
Just started playing. As a software engineer I hugely enjoy it. It's nice to puzzle with and it gives some nice insights in the hardware side of things. This practice is going to be a huge help when I start designing a smart house.

MSB should be on the left. We read FLTR and the bit with the highest significance should be read first. It might give an issue with existing circuits but it's not like inverting part of a circuit here and there is that big a deal. Also, for anyone too lazy to do so: You already beat the level, so who cares?
< >
Showing 1-12 of 12 comments
Per page: 1530 50