Content deleted Content added
Line 142:
:: I stand by everything I wrote (except that "vendor" was a wrong word choice). I taught the basics of computer architecture for more than 40 years, which suggests that I'm not totally ignorant on the subject.
::* (-4)+(-4) is not 1000 0100 + 1000 0100 in twos-complement. It is 1111 1100 + 1111 1100. (Your words "the remaining least significant bits represent the number" are only true in an indirect sense.) When these are added as 8-bit binary numbers, a carry into the sign bit occurs, and a carry out of the sign bit also occurs (but is discarded). Because those two carries are the same, no signed overflow has occurred. The result is 1111 1000 (-8) with the unsigned overflow flag set and the signed overflow flag unset. Your description and your example are both wrong.
::* "The ALU is stupid and I am trying to outline it's limitations." is not helpful. The ALU does exactly what its designers want it to do. They could have implemented separate signed and unsigned ADD instructions, but they chose to implement one instruction that does both signed and unsigned addition at the same time. '''The output from the instruction is not just the bits in the register but also the flags.''' That's not a limitation at all. The data bits plus the flags in fact indicate the full exact results of both signed and unsigned addition. In the case of operations like multiplication, the combination of signed and unsigned operations into a single instruction is impractical, so separate instructions are provided.
::* "sbyte" is a C#/.NET type name, and vbnet has "SByte". It is not a standard type name in C, C++, Java, Rust, Go, or Python. Both old and new languages there. It is misleading to present the name as if it is something more general. Similarly with some of the other type names. People who want to know C#/.NET conventions can go to those pages.
::* No, you can't cite your own blog articles unless they have your real name on them and you are an established subject matter expert, see [[WP:BLOGS]].
|