4 ms·
Er... yes? But I suppose every piece of data on a computer could be considered a number as well.
by jere 14y ago
Er... yes? But I suppose every piece of data on a computer could be considered a number as well.
- jerf 14y agoNot "considered"... is. It's not just an interesting trivia tidbit, it's a fundamental part of the machine ceasing to be simply magic and becoming comprehensible. Everything is just numbers flying around. Furthermore, if that's a revelation of some sort, or if you'd forgotten it, I'd commend to you a reading of any assembly language specification. Probably something simpler like MIPS or something, since in the end they are all the same w.r.t. the point I'm making here. I suggest this because it's important to see that at the very, very bottom of the machine, the very, very few things that the CPU can be truly said to be capable of, it's damn near "add, subtract, multiply, jump to some other instruction depending on the results of said", some instructions to fiddle with loading numbers from various places and a bit for receiving messages or interrupts when certain numbers arrive in certain places, and little else. There's no "display text" or "paint monster" instructions down there. It's actually very important to understand this. It's really easy when studying assembler to not only correctly notice what is there, but to notice what isn't.
- jere 14y ago>Furthermore, if that's a revelation of some sort... There's no "display text" or "paint monster" instructions down there. Ouch. It wasn't. A little painful though after having studied computer engineering and even recently writing games in DCPU-16. But anyway I will agree with most of what you said. The coolest part for me was always learning that there really was no magic underlying computers. >Not "considered"... is. My point is that everything in the computer being a number (large pieces of data being a single number) is just one of many interpretations and not a necessarily typical or useful one. At bottom, everything in the computer is actually some configuration of electrons. But it's not very useful to work conceptually at the level either.
- jerf 14y agoSorry, didn't mean that targeted at your directly. I meant in general, for the reader. "At bottom, everything in the computer is actually some configuration of electrons. But it's not very useful to work conceptually at the level either." And actually part of my point is that it is all of those things, at once. It's electrons and it's all just numbers and it's text, too. It's not really some of them but really not other things, it's all of them all at once.
- aaronblohowiak 14y agorisking getting too deep in the mud, saying things are all of them at once is not correct. You can treat most sections of memory as executable, numerical, textual or otherwise, but that does not make them so. For instance, control code points in ASCII are not text, they are an in-band control mechanism. NULL is not text; not in the way most people's working definitions of text would implicate. The fact that there are abstractions upon binary sequences are matters of convention and occasionally hardware implementation. Teaching that there are meaningful layers of abstraction is part of having a consistent (sound) understanding of the computer.
- jerf 14y agoI did not mean everything is text; take it as everything is electrons, numbers, and text/pictures/video/emails/etc., and a other layers too. There's no "right" or "true" abstraction layer, they're all true. Not necessarily the same kind of true in absolutely every case, but there's no "true" true here, where one can dismiss some layer or other as not important. The forest and the trees are both true.
- aaronblohowiak 14y ago>Everything is just numbers flying around. A number is just a representation. It is really a possibility that is being passed around. 'c', 99, 0x63, these are all just mappings from the permutation of '01100011'. If you think of it as a "number", then you will be surprised when there is overflow/underflow, or implementation issues with floating points. It is NOT numbers that are flying around, it is just high and low charges. This abstraction is very leaky. If you understand that all of the state of memory in a computer is one very long list of zeroes and ones, then a pointer is a list of zeroes and ones that encodes a location in the list. The reason why teaching pointers, floating point numbers, integer overflows and so forth are confusing to people is that they have been inculcated with abstractions that are wrong. Computation (in hardware and in theory) is one of the few things that can be taught axiomatically and doing so avoids many of the confusions and sticking points that learners encounter. I do not think people should start with a machine model (necessarily) directly, but they should understand it by the time they are learning pointers.