# Tag Info

178

You should teach both, and you probably want to use the binary unit. When you are talking about the difference, it may be helpful to tell them about how to tell the difference when reading them: The SI kilo- is k: $1\ \text{kB (kilobyte)} = 10^{3}\ \text{bytes} = 1000\ \text{bytes}$ While the binary kibi- is Ki: $1\ \text{KiB (kibibyte)} = 2^{10}\ \text{... 58 You should teach them it's messed up beyond repair, and it's their generation's job to teach the next generation to use the silly-sounding standard prefixes, so that when they finally retire (and the current old-timers are more permanently removed from the argument), there can finally be a consensus. As the matters currently stand, all the prefixes are ... 51 Actually, you need to teach them both so that they are warned that the usage is not consistent. Then you can choose one as a standard in your course going forward. Which you choose depends a bit on what you are teaching. If it is how to evaluate hard drives, etc. then$K = 1000$works now. For most programming, however,$K = 2^{10} = 1024$is probably best.... 21 The difference between providing your students with a proper discussion of this topic, and simply teaching them one or the other, is the difference between being a real educator and being a reciter of factoids. If there is no single correct definition of KB for you, then why would you instill something different in your students? The answer to your question ... 16 Yes I agree with other answers, teach both, and also note the similarity. The difference$\text{ki} = 1024 = 2^{10}\text{k} = 1000 = 10^3\text{k}, \text{M}, \text{G}, \text{T}, \text{P}$is sometimes used to mean$\text{ki}, \text{Mi}, \text{Gi}, \text{Ti}, \text{Pi}$The similarity$1 = \text{k}^0$and$1 = \text{ki}^0\text{k} = \text{k}^1$and$...

10

I've worked in IT professionally since the mid-1980s. My current practice is to write whichever of e.g. KB or KiB that I mean at the time, with KB meaning $10^3$ and KiB meaning $2^{10}$. If I'm talking about the RAM in a machine I'll write e.g. "64MiB" and if I'm talking about the as-manufactured and as-marketed size of a disk drive I'll write "1TB." I am ...

7

The basic confusion is in the notation at the KB (base 2 derived) vs kB (SI unit) unit level, and it is helpful to understand the origin of the use of the base 2 derived unit. A computer is a binary machine. At the basic level, memory addressing is binary. Usually, at the programmatic level, the addressing is keyed in hexadecimal format (it was originally ...

7

First, just a disambiguation: are you teaching Assembly language or C? Cos, they are not same as your question seems to suggest. C is a high-level procedural clean code language with tremendous abilities to speak to the bare metal similar to but not as Assembler pls. It may help you bridge to assembly but it is not assembly. Let that be clear to your ...

6

I am adding a second answer to clarify some issues with the question and to clear the obvious confusion in the answers. The question incorrectly states that the linked IEC communication recommends KB to mean 1000. The link refers to 'kilo' only. kB may mean the SI kilobyte, I.e. 1000 bytes KB does and has always meant 1024 bytes. Number 3 is essentially ...

5

Teach them that without context, you don't know because there most certainly are people out there who will use k to mean 1000 and others who will use k to mean 1024. Which is right is not relevant because both usages are out there. This leaves any use of "k" with bytes ambiguous unless whoever gave the number also specified what they meant. For this ...

5

My go-to answer for this topic is Nand2Tetris. There are 2 Coursera courses (Part I and Part II) that match the curriculum of the program. The first course does not require any programming background. Its focus is on computer architecture (logic gates, half-adders, full-adders, ALUs, RAM, ROM). The second focuses on a virtual machine and a compiler for a ...

4

I think you first need to decide what your goals are. Are you interested in computer architecture because: You want to design computer hardware and so need to understand it at a fundamental level? Or because you want to write software whose performance is enhanced by an above-average understanding of computer architecture? Or because you are just mildly ...

4

You may not win if you just use words. Instead, give them interesting but challenging exercises to do. One of the most fun exercises I ever did was to produce a Quine in assembly language. But, instead of producing a textual version of itself, as most Quines do, it produces a running copy in memory and then executes (branches to) that copy. The copy seems ...

4

Students should understand the importance of the memory hierarchy, including how caches use temporal and spatial locality to tremendously speed up memory accesses. Otherwise, a student would not know there is any difference between: for (int i = 0; i < 1000000; i++) { for (int j = 0; j < 1000000; j++) { arr[i] += j; } } and the ...

2

Teach them both but focus on 1024 in problems. They'll need to convert bandwidth, etc in networking and other courses. Converting using 1000 is easy but 1024 is tricky so focus on that, the knowledge will help them in computer architecture, assembly and networking courses. They'll have to work with it someday so get them ready

2

It sounds like you've already answered your question, but I'll throw in my two cents: It depends. Does every software engineer need to simulate the differences between direct-mapped, 2-way set associative caches, and 4-way set associative caches? Absolutely not. I've been a programmer for about 10 years now, and I think I have a pretty successful career, ...

2

TL;DR Understanding the levels of abstraction in a computer My AP Computer Science Principles course teaches three languages: Scratch, C, and Python. One of the 7 Big Ideas for the course is abstraction. At the end of the course, I emphasize how Scratch exists at the highest level of abstraction relative to the other two as a block-based language and how ...

2

Describing the low level architecture at the level of what the machine is able to do can greatly help some students to identify with the task of coding. If you do this, I think you also need to consider how to describe the link between this internal machine architecture, and the external (analogue) world. I don't think it's necessary to go into great detail, ...

2

A touch of some minimal explanation of logic gates, binary numbers, state machines and the processor-memory divide helps make computing seem less like magic, and more like technology (something of which they could become designers in the future). One doesn't need to teach actually using assembly language to explain how a basic fetch execute cycle works. ...

2

Forth is very interesting language which can run on bare metal, and also be as high level as you want (I've see a compiler/interpreter of subset of Pascal implemented in 11 pages) and will stretch brain of your students. I know it did mine :-) And is trivial to code some definitions in Assembly if you want. Code is incredibly compact, ideal (and still ...

2

I may be late to game, but you should target four "wow"s: "wow, how small .exe file is!" "wow, how fast this program is compared to Python!" "wow, and THAT is how it's done!" "wow, I'm a hacker now!" For first one, you should compare compiled sizes of some Go, C++, C and assembler programs which all do a ...

1

I would argue the best way to do this is have some demonstrations prepared: things they can build with the tools you're teaching that "look" flashy and exciting. Show some cool programs written in C, demonstrate some sort of Arduino-based program that looks interesting (a relatively simple one I've seen waters plants), something in assembly that looks ...

1

The other answers all give solid reasons for teaching that both exist and how badly messed up the current situation is. This is important, but it does not clarify what the students should prefer to use themselves. This answer focuses on the practical side of what the students can do; after learning about the current situation from the other answers. Assume ...

1

Regarding architecture specifically, I don't see a tremendous benefit in high-school level programming classes. However, at just one level or so of higher abstraction, discussing the principles of memory management as it applies to programs they write (such as stack and heap operation, how function calls are handled, etc) can make a big difference. It is ...

Only top voted, non community-wiki answers of a minimum length are eligible