‫Welcome to the BCT display explained lecture in this lecture I'm going to introduce and explain how
‫binary coded decimal display works.
‫What is binary code of decimal binary code decimal or also known as BCT.
‫This represents a spread of bits to a single digit A for obesity value ranges from 0 to 9.
‫A traditional binary value will range from zero to the highest number possible with the given number
‫of bits.
‫The advantage of using BCT is that it's much easier for humans to understand now the downfall of using
‫a binary code of decimal is that it's not the most efficient use of bits in a register.
‫So let's take a look at a standard binary counterexample.
‫We have a binary counter.
‫That's four bits wide.
‫We want to count from 0 to 15.
‫So we are binary value starts out at zero which gives us the for 4 bits.
‫We have four zeroes in our largest value which are be four ones gives us a hexadecimal value of f and
‫a decimal value of 15.
‫And so if we count true we're using every single combination of those four bits.
‫And there's a total of 16 combinations and we go through all of them counting from 0 to 15 in decimal.
‫However when our counter is displayed we can display the hexadecimal value which gives us here 1 2 3.
‫All the way down to F which is which is nice because it's very efficient and we're using every single
‫bit combination possible.
‫However it's not the easiest to read or understand if you're seeing multiple digits or you're not an
‫engineer you know.
‫So I wouldn't understand how the hexadecimal conversion converts to a decimal value.
‫So if we take a counter and let's try and do that in binary code a decimal what would that look like.
‫Well the forbit example would show us we have we start from 0 0 0 0 0 which is the hexadecimal value
‫of zero and a decimal value of 0 and go to the binary value 0 1 0 0 0 1 which is the hexadecimal value
‫of 9 and a decimal value of 9.
‫And if you notice after 1 0 0 1 we have all axes and that just indicates that it's a don't care.
‫After that our binary code decimal we're not going to display anything.
‫So we're only displaying hexadecimal and decimal or binary values of 0 2 9 and the disadvantage of this
‫is we're not using every single combination of the bits available.
‫So we're not being 100 percent efficient with our memory space
‫for binary counters are much easier to implement.
‫However a binary code a decimal counter is much easier to interpret from a human standpoint.
‫So for example if we have a binary value of 1 0 1 0 0 0 1 0 as far as for humans to read that that becomes
‫relatively complex or hard to intuitively know what that number is.
‫So if we take that binary value that is and convert decimal that's 162 and if we convert it to the binary
‫code a decimal format becomes 0 0 0 1 0 1 1 0 0 0 1 0 which is 1 6 2 or 162 to notice or in binary code
‫decimal format we're using more bits.
‫However we're making it easier for humans to read and understand it.
‫So in our assignment what we do binary binary counters are much easier to implement the binary code
‫a decimal is a lot easier read.
‫So we're going to create a counter and then create a design to convert that binary count value into
‫a binary coded decimal value.
‫So for our binary to binary code decimal design we are going to use the shift and add 3 algorithm.
‫So for example if we would have at 8 that binary number we would need to 1 shift the binary number left
‫one bit and we would need to do this eight times because our number is 8 bits of 8 shifts have taken
‫place.
‫The binary code a decimal number is in the hundreds tens and units column of the binary value and any
‫one of these columns is 5 or greater.
‫We want to add three to that value in that binary decimal coded column and we'll go back to 1 and just
‫keep doing this until eight shifts have taken place.
‫So let's look at an example where instead of 8 we're going to be doing a forbit value.
‫We're going to convert the hex value d to binary code to decimal.
‫So first to start out we have the hex in hexadecimal value which in binary is 1 1 1 0.
‫And when you shift it four times.
‫However every time we shift we need to check if any number of bits in any one of the columns is greater
‫than 5 or equal to pi.
‫We need to add three.
‫So to start out we'll do our first shift where our units has a value of 1.
‫So nothing is greater than or equal to five.
‫We'll shift again or shift number two and once again nothing is greater than or equal to 5.
‫So you are shift number three.
‫Now at this point after our shift three in our units column The number is greater than 5.
‫So we to add three to that units column.
‫And once we do that our tens call now has a value of 1 in our units column has a value or attends excuse
‫it has a value 0 or unit has a value of 1 0 1 0.
‫Now we want to shift for the fourth time.
‫And when we do this fourth shift we are now in the tens units and we have completed our shift and add
‫three algorithm which gives us in our tens column of 1 in our units column of 4 which is a value of
‫14 which is equal to original value of b.
‫However 14 is much more intuitive and easy to understand for humans as opposed to just saying we or
‫1 1 1 0.
‫Now you know how binary code decimal counter works.
‫Let's go design one.