Video instructions and help with filling out and completing When Form 8815 Representation

Instructions and Help about When Form 8815 Representation

You might already be familiar with binary for example this is 1 0 1 is equivalent to 5 in decimal that's because this is the ones place this is the twos place fours place eights place 16 32 64 and 128 and we have a 1 in the fourth place and a 1 in the ones place 4 plus 1 is is 5 so this is fine but how might we represent a negative number so let's say we wanted to represent negative 5 well there's a couple ways we can do that one way is to take this 128 place and instead of using that as the 128 place use that as a sign so change this to a 1 here to indicate that this is negative and then the rest of it is the same 1 0 1 and so this would be 5 here and then instead of this representing 128 it represents that the number is negative so negative 5 now of course it's important to know how many bits you're working with right because if we're only using 4 bits then a 5 would be 0 1 0 1 that's equal to 5 but then we're going to use this this top bit here in this case we're only using 4 bits to the top that is this fourth bit and so negative 5 might be a 1 1 0 1 and now instead of this being the eights place this is actually representing a sign so this would be negative 5 and this would be 5 so it's important to know how many bits you're working with so that you know which bit is the first bit and therefore which bit indicates what the sign of the number is so to keep going with this example we can look at just regular counting and binary here of course if we have all 0 0 0 0 0 that's equal to 0 and then if we have a 1 in the ones place that's equal to 1 we have a 1 in the twos place that's equal to a 2 and a 1 that's equal to 3 and then of course a for is for a 4 and a 1 is 5 a 4 and a 2 is 6 for a 2 plus a 1 is is 7 so that's simple enough and then if this this first bit here is is indicating our negative sign then we can go backwards to so if we have a negative 1 that's negative one a negative to a negative you know 2 and a 1 is 3 and then a negative negative 3 negative 4 negative you know 4 and a 1 is 5 with a negative is negative 5 4 2 2 is 6 so this is negative 6 and then a 4 plus 2 plus 1 is 7 and that's a negative 7 and so this is our sign bit and so this first bit is our sign bit and then these other bits are just our 1 2 & 4 place simple enough couple weird things about this though one is that you'll notice there's a negative 0 right because you can have 0 0 0 and then it can either be 0 in the sign bit place or a 1 in the sign bit place so you can have you know there's a difference between 0 and negative 0 so that's that's kind of weird the other thing that is maybe a little bit inconvenient we'll look at some some other approaches that that don't have this problem is if you try to add these things together things get kind of weird so let's say we want to add a 5 and a negative 5 so normally 5 plus negative 5 you would expect to get 0 simple enough but here if we look at 5 0 1 0 1 and negative 5 is 1 1 0 1 if we add these together 1 plus 1 is 2 which be a 0 and then carry the 1 1 plus 0 plus 0 is 1 1 plus 1 again is to the but will that is a 0 and carry the 1 and then here 1 plus 1 again is 2 so 0 and carry the 1 so in this case what we're seeing is 5 plus a negative 5 is not 0 it's 0 0 1 0 which well and we have a carry so we have a carry coming out of this this this one bit that we don't you know if we're working with 4 bits we're going to ignore this this carry bit and so we have 0 0 1 0 which is which is 2 well that's kind of weird we're adding 5 and negative 5 we wouldn't expect to get 2 and you can try adding some other things here it doesn't it doesn't work so let's take a look at another scenario here this is called one's complement what this is is again everything from zero to seven is the same same same as we saw before and this first bit here is all zeros so we know that these are all positive but what we do for the negative numbers is we actually just flip all of the bits we take the compliment of all of the bits so you know 2 here is 0 1 0 well 0 0 1 0 negative 2 is 1 1 0 1 so we're just flipping each of those bits so we flipped the 0 401 we flipped the 1 4 0 with the 0 4 a 1 and so on if you look at each of these numbers so 5 is 0 1 0 1 negative 5 is 1 0 1 0 so what happens with with this so we still have this kind of strange thing where we have negative 0 and we'll come back to