text:
How can I deal with students that are too sensitive when they are wrong? Particularly when they answer simple questions incorrectly during class?
I am an instructor in a STEM field. I am teaching an upper-division course where I try to interact with the students rather than just lecturing. I am teaching in the students' native language; there do not seem to be any language issues.
I am struggling because the students tend to give wrong answers to simple questions I ask during lectures. These really are simple questions; they should have learned this material during the first few weeks of their first year.
To make matters clear, let me give an example. If we are in the middle of a proof, I might ask "what is the result of log (a * b)?". The right answer is "log(a) + log(b)", however, they will say "log(a) * log (b)" as an answer. Then, I did not see any other way and would say "no guys, it is log(a) + log(b)."
Situations like this repeated over the entire semester. Students complained to my boss and in the student evaluation that I was demeaning them and that I was upset when they answered something other than the answer I wanted to.
I will teach some of these students next year in another course and I have a hard time trying to find a way to solve this issue. The only solution I see for this is to just lecture and not encourage participation in class. However, I was wondering if there would be any other wiser solution.
Tips from here are good, but instead of a colleague, I'm dealing with students.
Edit: This is actually an upper-division chemistry course. The situation above arises, for example, when I have to explain why pH + pOH = 14. Students should have learned that in general chemistry, but I like to derive it to remind them. When I perform the derivation, I start from the auto-ionization of water and eventually arrive at:
14 = -log ([H3O+][OH-]). Then I ask them how to simplify this in order to complete the proof. But they do not remember the properties of logs.

A bunch of information from the comments has been edited into the main post. There was also another example ("what shape is this? It's blue. No, it's a square.") -- I removed this from the post as it was causing some confusion, but some answers may still reference this. Also: comments have been moved to chat. Please continue the discussion in chat, but use comments below this one only to suggest improvements or request clarifications to the main post. We can only move comments to chat once.

How common are these incorrect answers (most answers?, occasional?) and are they consistent year-to-year (e.g. log rules are usually forgotten)?

"I am teaching in the students' native language; there do not seem to be any language issues." - Is it also your native language?

It might help to tell us more about the level of the class. "Upper-division" needs translation for readers in other countries.

Like others here have indicated, you can reframe the questions to avoid this, but there's another aspect to consider.
It can be really hard to foster an environment where people aren't afraid to speak up at the risk of being wrong. It's embarrassing enough to put yourself out there in front of a couple dozen of your peers and friends and be wrong, but if your professor responds negatively, whether it's in body language, vocal tone, and/or word choice, that only makes it worse. On top of that, the expectations that a professor sets up in how in the question is presented can also contribute to this.
Let's take your example:

A real example: If I ask "what is the result of log (a * b)?". Even
though I'm expecting "log(a) + log(b)" because we are in the middle of
solving a problem and need to use the properties of logs, I'd be
prepared if they say "multiply a and b and take the log", however, I
will get "log(a) * log (b)" as an answer. I don't see how I can help
them with their self-confidence and try to make their wrong answer
seems "ok". The only thing that I would say is "no, that's wrong".

And try approaching it differently:

Prof: Does anybody remember the math identity log(a * b)? Take a few seconds to think about how we would restructure this.

This does two things: it reminds them that it's something they've probably seen before, but it is also indicates to them that it's something you don't expect them to immediately be able to recall (if at all).

Prof: Does anybody want to take a guess on how to rewrite it?

Using the word 'guess' helps to lower the stakes and indicate to the students that it's okay to be wrong.

Student 1: log(a) * log(b)
Prof: That's a reasonable guess, but a very common mistake that comes up every year
Student 2: Peanut butter
Prof: Not quite the direction I was looking for; I might not have been as clear as I thought. What I meant was... (clarifications/rephrasing)

Instead of just saying they are wrong, reflect on their answer and why they might have gotten it. Use word choices that acknowledge their mistakes without making them feel like a fool. Even though a blunt "that's incorrect" might technically be a correct word choice, there's a good chance that there's more that could be said about their answer, which will help you come off as more empathetic.
But word choice is only a single part of this. There's body language and vocal tone. If you come off as disappointed or defeated or exasperated, it will negatively impact your word choice and how your students respond to it. It can really help to just maintain positivity and excitement through the whole process, and that will help to encourage students to feel better about taking risks and making mistakes.

Nice. https://academia.stackexchange.com/questions/185225/how-can-i-deal-with-students-that-are-too-sensitive-when-they-are-simply-wrong#comment498614_185256

Why would it be ok to lower the stakes on the retention of basics?

@bukwyrm because in the end a positive and encouraging environment facilitates learning better. Scolding will not make people who don't understand the basics any smarter

@bukwyrm A couple of initial thoughts. First: You assume that all your students were adequately taught the basics. Maybe you can get away with that within a self-contained program where you know the standards of your fellow educators, but if the students learned these basics outside of the program (e.g., high school), then that's definitely not a safe assumption.

Second: People are more likely to remember things the more they actually use them and the more recently they've used them. There are a lot of basics I know because I apply them on a regular basis, but there are a ton that I don't remember off the top of my head because I haven't used them in a long time or I just use them very infrequently and have to refresh myself when I need them. And just because a professor/researcher uses something day-to-day, it doesn't mean a student taking classes does; those are two different situations and you can't have the same expectations for both.

To be clear, I'm not saying a ton of time should be spent reteaching the basics. In the case of OP's example, the interaction could have ended like so: Prof: If you don't remember, or were never taught, why log(a * b) = log(a) + lob(b), then I strongly encourage you to look it up outside of class. (Assuming a deeper level of understanding about the topic actually is beneficial for class; sometimes, hand-waving off the finer details is perfectly okay until they progress further in the field)

How can it be OK to be wrong and why would someone want to lower the stakes on the most basic things of the course? I am all for avoiding a punishing environment, but the students must feel the importance of mastering basics and framing every answer as an acceptable one or as a game of guessing is counterproductive in my opinion.

@Zanzag Sometimes students get assigned to us and don't have all the proficiencies we expect. But since they're there, it's our obligation to try and teach them. Creating an environment where they're willing to try at least (and be wrong) is beneficial because it means that they (the ones most likely to struggle) are more likely to engage with the classroom, rather than just sit and stare off into space daydreaming. Not only are engaged students more likely to learn in class, but they are going to be more likely to seek help outside of class (e.g., office hours) if they need it.

You also don't have to phrase it exactly as I did with the word "guess". My point was that there can multiple ways to phrase a question, and carefully choosing your words can have a big impact on students. Another example: "Who wants to tell the class what ... means?" vs "Does anyone know what ... means?". They accomplish the same thing (probing students' knowledge), except the latter implies that some people might not know it. This helps students to feel like they aren't alone when they don't know something, which in turn will help their self-confidence.

@Zanzag: Have another look at the last paragraph of the question.  It's a chemistry course, and the prof likes to derive some pH properties using math.  It's basic math, but perhaps not math they'll need for this course.  Or even if they will, this is maybe the first time it's coming up in this course.  Key point is that it's a chemistry course, not pure math.  I think that give a lot more leeway to lower the stakes, as well as making it plausible that students can be taking this course without being math experts.  (So a wrong answer is much more likely, and something to plan for.)

@Zanzag This is a philosophy of (modern) teaching matter.  You seem to be thinking about this in a practical "would we do this in a real world job?" type of way.  In that case, "guessing" and gently allowing errors can be a real problem.  You certainly don't want your doctors and nurses doing that. But this is a school room, not an operating room. They are there to acquire new skills and challenge their abilities in a low-consequences environment. Much of the modern (European/US) school system has shifted away from a "trade school" mentality, and does not emphasize "how we do this at work".

Peanut butter..

This is a great answer. Consider an opposite response... "One more dumb answer like that and you'll get and instant F!". How likely would your students be to participate?

@zibadawatimmy Actually, especially in the real world, it's necessary to allow for wrong answers in a non-demeaning way. 1) If wrong answers are seen as demeaning, then superiors will not listen to correction from subordinates, 2) If wrong answers are seen as demeaning then subordinates will be hesitant to speak up if they are unsure if something is correct or not. There was a whole bunch of aviation accidents that were preventable except that either the crew didn't speak up clearly or the captain ignored the crew and aviation now has a whole branch of training on communication.

You really, really want your doctors and nurses to be OK with saying things like, "I am not sure about x." and then the other doctors and nurses calmly considering the matter, without anyone feeling like it's a personal issue if something is wrong--the focus should be on the whole team together coming to the correct answer. Especially acknowledgement that things like fatigue and just general human error are things that happen to everyone, not like personal moral failings.

@zibadawatimmy and Zanzag Citations desperately needed for your assertions that a teaching style that doesn't make students feel comfortable giving wrong answers produces better real-world outcomes! I see that tone of comment often on this SE, it gets under my skin ...

@qdread I never made such assertions, so you and your skin can just talk to yourselves.

+1 Instead of "You were playing too fast", you can say "Not quite the tempo I was looking for." And then it can become a learning moment, where instead of telling the student that they were playing too fast, you can say something like "Do you think you were rushing, or dragging?"

You are asking them to answer a question on the spot. They get flustered, say something stupid, and you don't respond in a very sympathetic way. Then they are upset.
Yes, you are right, log(a*b) is just not log(a)*log(b). But it is an understandable way to mess up, particularly with the pressure of answering a question in front of the class, particularly with the pressure of being asked by a professor who has a reputation for shaming people (that professor being you, apparently).
So you need a way to ask the basics, and get them to realise their mistakes, without feeling shame over it. I've seen people achieve that in two ways;

Whenever you mistake yourself, highlight it, laugh at yourself, then move on. I was taught by a prof who, after making a sign error, came out with the wonderful line; "maths; it's like sex, good fun, but quite difficult, and you probably shouldn't do it in public", we all found that funny. And when we made  a mistake, he would say "ah, no, that's exactly to sort of mistake I'd make too, but actually the answer is ....". You are making it clear that mistakes are normal, and so people don't take it so hard when they get things wrong publicly.

If they are making a lot of mistakes, you might need a different approach. Firstly, lets get an anonymous answer from everyone, with a digital voting system. There are lots available, some of them free. You ask the question, then all the students answer.
A. If 95% of the students got the right answer, you can just confirm it and move on.
B. If about 50% of the students got the right answer, ask them to discuss their answer with their neighbour. Don't say which answer was correct, just tell them to try an convince their neighbour of their answer. This is normally very effective, particularly for basic topics, the ones who got it right are quickly able to convince the friend next to them who got it wrong. Or when I try to justify my wrong answer to the person beside me, I'm very likely to notice that it was incorrect. Crucially, nobody is ashamed, as they are just chatting with the student sitting next to them, so they are open about their confusion. Ask them to vote again after 3 mins of discussion, and you can check it worked.
C. If more like 25% of the student got it right, you need a quick review. Go thought it on the board, and then run another poll. Hopefully, you are able to explain well enough that you at least get the majority of the students understanding.

People will react with anger when they are ashamed, that's almost hard-coded into human psyche. People protect their ego more fiercely than just about anything else. So you are more likely to get a constructive reaction if you are careful not to make anyone lose face. But these two suggestions are ways to mitigate the shame associated with being wrong.

The prof who taught you, and all of us, should keep talk about sex out of the classroom. All that does is make women (who are already too often alienated from STEM communities) feel even more uncomfortable.

In 2.B, are you letting them know what is the right answer before they have to discuss with their neighbour, or should they try to figure it out through the discussion?

@silvado the way I've seen it done, you don't say which is the right answer before the discussion. You want the people who got it wrong to also be trying to explain their answer, because in the process of explaining a wrong answer, most of us understand why it's wrong. The danger that people who got it right will be lead astray is minimal.

@GregMartin I identify as a feminist, and most of my female friends seem to have a healthy interest in sex.  Banging on about it all the time could be unpleasant (pun unintended), but do you have any evidence that the occasional jest is going to be make women feel uncomfortable?

@GregMartin - very sexist to assume women would be uncomfortable with a remark like that!!

@deep64blue Ok, I didn't really want to weigh in on this. In part because it was a real thing a prof said, and it was well judged for the time and place. But I'm not insensitive to the idea that sex related humour is socially complicated. It's not unreasonable of Greg to point out that this could be a problem, and if the joke had been told after a student's mistake I agree it would have been in poor taste, because then the prof is directing a sex related comment at a student.

@deep64blue for what it's worth, it reminds me of this discussion https://academia.stackexchange.com/questions/109789/what-was-offensive-about-the-ladies-lingerie-department-joke-and-how-can-i-av/109801#109801

I had a math professor who would say in joking tone "ah, you are careless" when students made mistakes.  Which you'd think would make people feel bad, but just by his tone of voice and manner made it clear enough that he was joking.  And crucially, when he made a rare mistake, he'd say "I am careless!", with a similar same joking tone.  He was well-respected by our class as a good instructor, and great at freehand diagrams on the blackboard.  (He was Korean, and the style of respected and competent authority figure worked well for him, like a martial arts sensei, but not unapproachable.)

@GregMartin why do men keep thinking they are the authority on how women feel instead of letting women speak for themselves?

Ask yes or no questions.  Then ask why.
Instead of asking what shape a drawing is, ask the students if it’s a square.  Then ask why it’s a square.
This lets students know what the right answer is.  If they have trouble getting to “all sides are the same length and at 90 degree angles” then you know a review session is in order.
As a professor it’s difficult to understand what an easy undergrad question is.  You’ve had 5+ years of extra education on top of likely being a good student.
Using yes/no questions at first limits the answer, and the why follow up ensures it wasn’t a lucky guess.  If people take more than a minute to completely answer why time for a review session.
EDIT
A commenter pointed out that my original answer “all sides are the same length” isn’t enough.  They sides also need to be at 90 degree angles.
Answering on the spot is hard.  As I’ve shown it’s easy to leave out information that you know.  It’s even harder when you’re being ask by an authority figure like a professor.
If a student had said that - follow with something like “that’s part of it, you’re almost there.  What other thing has to be true about the lines.”
EDIT 2
And even that isn’t technically enough to correctly answer the why.  Leaving the question as is to show just how difficult answering can be.

Especially the "ask why" is very important! I suspect you ask questions with the purpose of helping the students learn. Questions are a way for you to figure out the student's thought process. Without asking "How did you arrive at that answer?" you miss this opportunity and asking it was worthless.

@Stef you are correct - edited to include 90 degree angles.  Also probably a good example of how even easy questions can be hard to answer on the spot like I tried to.

Note this is also not the only way to characterise squares. "Diagonals are the same length and intersect in their middle at a right angle" works too. Also, combinations of your characterisation and mine can work too: "all sides are the same length and diagonals are the same length and intersect in their middle"; "diagonals intersect in their middle at a right angle and the sides make right angles"; etc

One key point to consider here that hasn't been brought up is that your job in the class room, as a professor is to teach the student who are actually in front of you, rather than the student  you would like to be in front of you, or think should be in front of you.
Its no good saying that "they should have learned this material during the first few weeks of their first year." - this particular student clearly doesn't know this right at this moment, wheather they "should" or not. What you do with that information depends on whether they are alone in this deficit, or it is indicative of the class as a whole. If a substaintial fraction of the class doesn't remember that log(a*b) = log a + log b, then you need to teach them.
This circles back to asking why we ask questions in class. Asking questions doesn't, in it self, make teaching better. There are generally two reasons to ask a question:

Guide the students to reflect or think about a particular point, that will hopefully lead them to coming to an important incite about the topic themselves. This is reffered to i  pedagogy as "co-construction", as you are helping the students to construct the knoewlege for themselves.
For a rapid, real time assessment of a students knowledge. This is only useful if you are going to do something with the result - tailor the class to how well the students are coping with the material. Asking about prerequisites can be useful, but only if you are prepared to divert the class to explain a prerequisite that appears to be missing in a significant section of the audience.

There are several ways you could nudge your students to the correct domain, for example:

a : b <=> c : ?  question formats, which they may be familiar with from some types of testing. This gives them two hints - the relationship between a and c, and the relationship between a and b.
E.g. ▲ : triangle <=> ■ : ?
minimal pairs, examples where the only difference between two items is the one you are interested in.
E.g. ▮ / ■
Chains where you start from a concept you know they grasp, perhaps because you've just refreshed it, and then move on by very small increments to the concept you want. You can combine this tip with the above - present the chain, then ask your students to identify what feature is introduced at each step.
E.g. plane figure -> polygon -> quadrilateral -> parallelogram -> rectangle -> square

Other replies have comments have mentioned other useful techniques, like multiple choice, yes/no, etc.
However, I'm more worried about the fact that you don't really seem to consider the possibility that your questions may be genuinely hard to answer. I remember many teachers who would go through this process: think of a concept A that they want to assess -> think of a plausible question Q that A is a correct answer to -> get flustered when students answered with one of the many, many other possible answers to Q and be unable to give more guidance as to what it is they wanted, other than "try again" or "that's not right". These exams turned into a game of "read the teacher's mind" and were stressful and distracting from the subject.
Your example is obviously hyperbolic, so it's hard to assess this possibility. I'll point out, however, that you use "it is obviously a rectangle" as an example of an incorrect answer to "What is the shape of this ■ figure". Surely that figure is a rectangle? And a simple polygon and a trapezoid and a number of other correct things that are not what you had in mind when you asked the question. So I really suspect that this is what is going on. If you are willing to share a real example, people here will be able to give you pointers to making your questions less confusing and frustrating for you and your students.
Edit
The OP’s comments and edits make this answer completely obsolete - there isn’t, in fact, a domain/category problem at all, just “normal” wrong answers that need some teaching skill to be turned into a learning opportunity instead of a put down. anjama, Clumsy cat and Jessica have covered what I would say about this already.

These exams turned into a game of "read the teacher's mind" and were stressful and distracting from the subject. Quite likely that this is what OP perceives as students being "sensitive".

I really like the first point of your answer. I play a game with my students when I see them struggling... "Let's play the game of Complete this!" or I start with the sound of the first syllable of the word of the correct answer, and possibly tell them how many words the answer has... This may sound silly, but the idea is always to give them clues/guidance, even tough the answer should already be known by them.
I would also add that we need patience, lots of that, and remember that we do not know the background of our students even though it may seem easy to guess.

"▲ : triangle = ■ : ?" I would be soooooo confused by this. "triangle = ■"? What does that even mean? And then it ends with a question mark, so it's a question? The answer to that question is "no", I guess, since a triangle is usually not equal to ■? (I still upvoted your answer, because of the paragraph about reading the teacher's mind).

@Stef, yes if you've never seen this notation before it is not particularly intuitive... It comes from fractions but in its loose usage it is read "▲ is to triangle as ■ is to what?" and it means "the relationship between ▲ and 'triangle' is the same as the relationship between ■ and the solution". For example: "foot" is to "shoe" as "hand" is to ? (solution: glove). This notation is commonly used in some types of standardised testing, so students may be familiar with it.

While I understand what you mean by "▲ : triangle = ■ : ?" I don't think the notation is good.  You're using "=" to mean something other than equality/equivalence of mathematical objects.  On the other hand, I find the minimal pairs example ▮ / ■ confusing.  You could be asking for difference in shape or width or height or rounded corners or area or width:height.

@Kendall, fair enough, this is how it was taught to me but any suggestions to make it clearer are welcome. Re: square/rectangle shape, these are Unicode so will render differently depending on browser. I just checked on Safari and indeed they look nothing like each other (rounded corners, Apple? really?). But you’re right: there are many ways to answer that question, and the point is that the students can’t divine which one you had in mind, and they’re not wrong for picking another. Reminds me of those “find the odd one out” puzzles where each item can be a different, correct answer

@Kimball: I agree that "=" is confusingly nonstandard, but I wish you had explicitly stated a standard notation for analogies, such as "colon notation" a : b :: c : d ( https://en.wikipedia.org/wiki/Analogy ).

The question conflates a number of different things.

"How to deal with category mistakes and other ontological problems when teaching a concept?" (the example about failing to recognize a square as such)
"How to spare a student's feelings when telling them they are wrong?" (the point about being sensitive)
"What to do about students who falsely believe they are right?" (the point about insisting the square is peanut butter)
"How to help students make fewer mistakes when applying techniques they learned?" (the realistic example of incorrect log transformation)

You have of course added information to try and make the question more clear, but I think it's nevertheless confused things a bit, and it's better to answer these separately. Taken on its own, each sub-question has a simple and direct answer, and when individually understood, these answers make the overall issue plainer to see.
Mistakes in applying techniques
The time-tested solution is practice, practice, practice. If students make mistakes with algebraic operations that they already "know", first thing you want to make sure is that they're getting adequate practice via homework, problem sessions and in-class example problems/solutions. When solving non-trivial problems, one must not only apply techniques correctly, but also be able to select which techniques are appropriate. You can supplement this with trivial problems, such as asking them to rewrite "a=logx" as "x=e^a" and vice versa, or evaluate with certain numeric values of x or a.
It is also useful to teach fall-back techniques when their knowledge of the primary skill fails. For example, even if they don't remember whether the distributive property applies to logs, they can try to prove/disprove it in some quick way (such as: "log2(16*4)=log2(64)=6" clearly does not equal "log2(16) * log2(4) = 4*2 = 8"). Another option when failing to remember a rule is to try and remember its derivation instead.
Sparing a student's feelings
There's a lot to be said here but briefly, you want to create an environment where students feel safe in making mistakes and asking questions, while also having confidence in their ability to learn. You should set up the lesson plan so that everyone is always learning something, even if not everything, in that lecture. When explaining concepts and answering questions, try to identify what part of the explanation seems like a "leap" to the student, and break it down into simpler steps. Recall earlier lectures where students were not able to solve a problem which they now can, and point out that what seems intractable now will soon become soluble with some effort and practice.
Keep in mind also that not everyone will be a prodigy in every subject. You want to present the subject as a ladder of knowledge and techniques, where student will see that increasing commitment of effort will yield increasing mastery, and yet there are evenly spaced "exit points" where they can stop investing into the subject and still have some partial mastery to take away from it. This also helps them recognize the proverbial steps by which mountains are climbed.
Dealing with stubborn students
Assuming the student is acting in good faith, the problem here is typically your failure to establish rapport and authority in the class. Ideally, you want to establish and maintain as clear a picture as possible in the students' minds of what they are attempting to learn in a class and what the utility of this is. Even if you are not able to justify to them what good logarithms are in every day life, you can at least emphasize that they are a prerequisite of many other interesting topics. You can also look for examples of real-world problems where they apply (exponential population growth is often a good one).
When the a student claims that you are wrong, you should be prepared to justify your claim with various proofs and examples, as well as refuting the student's claim persuasively. This of course requires a pre-agreed upon standard of truth: Either the student body must implicitly believe certain criteria for accepting an argument as correct, or you must establish them from the first day of class.
Note that students claiming you are wrong are an excellent opportunity to (a) figure out what parts of material you failed to explain adequately and (b) teach students techniques for independently verifying their own work and catching their own mistakes.
Category and other ontological mistakes
What I mean by this is things like confusing a square with a rectangle.
This is a broad pedagogical topic but ultimately you want to avoid relying too much on the Socratic method if your rapport with the students is not excellent. Do not draw a square, ask what it is, and then get frustrated when they say "a drawing". Tell them the rule right away:

In this class, we are mainly interested in whether things are squares, triangles and circles. If they have four equal sides we will call them squares. There will not be trick questions about equilateral parallelograms or non-Euclidean planes so don't worry about that.

As the class goes on and students learn your style, you can ramp up the Socratic element, but you should always start out didactically.
You want to pick a closely related set of learning objectives, ideally in the same or similar ontological categories, and focus on those. Leave the philosophy to philosophy class. When teaching algebraic techniques, don't distract them with difficult ontological dilemmas. It's okay (and arguably useful) to point out ontological asides, but don't quiz them on these.

+1 for the "sensitivity/feeling-sparing" part, which I think most of the other answers have missed. You want to set up an environment where students feel safe being wrong. While it's easier/better to be right, being wrong out in the open is a way for students to learn. (I think another part of the conflation in the original question is "students don't know what they should/are underprepared", which is yet another can of worms ...)

Very good answer. Separating out the issues really helps!

The last section introduces a really good point about teaching style: it needs to change based on the student's current level of knowledge in the particular area being taught. I've found From Novice to Expert, Patricia Benner's explication of the Dreyfus model of learning, to be very useful for this.

Obviously I can't get into it much in a comment or two, but the flavour of it is: 1) Novice: tell them to do X, and exactly how they should do it. 2) Advanced beginner: give them a (simple) goal and let them determine how to reach it. 3) Competent: give them rules to determine the goal. 4) Proficient: give them (sometimes conflicting) guidelines from which they need to choose.

If you're asking them about something that they were supposed to learn a long time ago, it's possible that they forgot, or maybe they never learned it when they were supposed to. One thing you could say (if you have enough time) is:
"Before I get to today's topic, I want to review [topic from previous class], because it's essential for understanding today's topic. It's usually taught in [name of class], but I understand that you all have different backgrounds. Some of you may have learned it a long time ago and forgot, and I want to make sure we're all on the same page. You can also read up about it on your own by consulting [references]. [Insert review]"
Edit: Now that I saw your example, it's possible that your students didn't pay much attention to the properties of logarithms. One kind of sneaky way to get more correct responses is to teach something that uses that logarithm property at the beginning of class. Then when you get to the derivation and ask what happens, you're more likely to get correct responses.

+1. Currently as a computer science student I can say that there a lot of basics in math that are never covered but always assumed as already taught. I assume the same happens in other fields, for other topics, as well.

@lucidbrot: In undergrad physics, the physics classes actually know they'll be ahead of the math classes, and need to teach the practical how-to-use-it aspects of the math.  This was a known thing that I think even got mentioned to the class by the professors in a couple of my 2nd year undergrad physics classes.  (Math takes its time and cares about proving things.  Physics needs to use that math to talk about actual physics of oscillators, surface integrals for fields such as electric and magnetic fields, and so on.)  So that's the other side of the coin; common in many fields but not all.

Are you clear about your aim when asking students such questions? I think that asking such questions when being more or less sure that students will give the correct answer is fake interaction, and students will realise this. What's the value of showing a square and students then saying "that's a square"?
Now your students tell you something else. I'd actually like that, because I like that students give me something that I didn't expect. It is information for you that students tell you something else than what you expect; but of course you have to make some sense of that information. The obvious (but not necessarily the only) reason would be that the basic material was not learnt as well as you hoped for, which of course you can take into account in further teaching (maybe there's more repetition required, maybe it is worthwhile to make more references to earlier material in the sense that some later learned things also agree with earlier concepts or provide examples/special cases for them and the like). You may also question your way of teaching the basic material, or you may want to find out (just to given an example for another possible issue) whether the life situation of many students prevents them from learning enough, or learning well enough.
A more positive spin on your communication with the students can be given by thanking them for contributing something to the class, and thanking them for showing to you how these concepts can also be perceived, even if wrong, because it means you've got to do something about their understanding.
Personally I tend to avoid questions of this kind (I may occasionally use them, see below) because I know that it is not nice to be told in front of an audience that you got something wrong. It may produce a bad feeling, at least if this happens in a bad way.
I rather like to ask questions that are meant to give me information about how the students think, generally trying to value what they contribute in other ways than just stating whether it's correct or wrong. I prefer to ask questions about which more than one opinion is possible, or questions that even though they seem simple are connected to some hidden difficulties. Sometimes I want students to get things wrong in order to prepare a next result that shows a concept from a different angle and will likely change their view on what was taught earlier. Sometimes I ask rather hard right/wrong questions and if there are different opinions, I ask the students to try to convince each other. I then also thank all involved for their contributions; those who were on the wrong side of the argument had the effect that more explanation was given which was apparently necessary, so they would have a positive impact on the teaching.
I know that some students are happy to show off their knowledge by answering a simple right/wrong question correctly, or even to test it by guessing an answer that may be wrong. Such questions can serve to make sure everyone operates on the same basis (or rather to push they group at least a bit in that direction), and may serve to bring attention to your teaching again when some students may have lost it. So I'm not saying they shouldn't be used, but my attitude when asking questions is always that I won't expect one particular answer (as then I'd be bored when getting it), but rather that this is, as much communication, a vehicle to find out something also for me, rather than another way to assess the students (for which there are exams).

Don't tell people they are wrong. Tell them when they are right.
Let's consider your actual "log(a*b)" question because it's real.
When you ask the question remind them where they would have heard this - say "you probably remember this from your pre-calc class".

Let's say the first student answers "log(a) * log (b)". You say "OK, any other ideas?"
The second student says "multiply a by b and take the log", you say "yes, that's true, but I'm looking different form to state that in?".
Hopefully somebody eventually says "log(a) + log(b)" and you say "yes, that's right" and move on.

You haven't upset anyone by telling them they are wrong.
If there is pushback, and someone says "what about log(a) times log(b)" ask the class if they think that's right. If there is doubt say "OK, let's try it". Get out a calculator. Calculate log(2), log(3) and log(6) and see if log(6)=log(2) + log(3) or log(6)=log(2) * log(3). Or if that takes too much time ask them to look up the result in the pre-calc course notes.
The other possibility, since this isn't key information for your class, is to just go ahead and state the result without asking the question. Just say "..since log(a*b) = log(a)+log(b) we get the result..."

The only solution I see for this is to just lecture and not encourage participation in class

You would be doing them a disservice.
Now, what you can do depends on how the feedback they provide impacts your position on a professional level. It also depends on the culture of the country.
If it does impact your career then I would do what is best for me: get wonderful marks from the pupils. Yes, this is sad but if my company university sees this as a way to rank me then obviously I will comply.
Bad luck for the students.
If it does not impact your career then you can do real coaching in addition to teaching. You would be doing them a disservice by letting it go because they are adults who as supposed to behave like adults.
People may have all sorts of opinions about how to not bring discomfort to the youth but tomorrow they will be on the job market where they will get a kick in the butt without warning.
I would encourage them to answer, but also to review the basic information they will need for the course. Actually, with your experience, I would provide them what they need to know in math right at the start.

Despite not having a feedback system at the end of the year, I usually asked students to give me one. They had the opportunity to tell me who they were if they wanted to help me understand.
I was less interested in the great ones (though it is always nice) and was looking at the medium and bad ones - and trying to understand what went wrong.
So I find feedback a good thing when it is not a way to rank a teacher (which is the case in the US if I understand correctly).

If the college wants to be a diploma-mill and he stands in their way, then his career is going to end up as roadkill.  How do you pay your mortgage or feed your kids without a career?

Don't ask questions about prerequisites, only ask questions about the ideas you're teaching.
Just assume the prerequisites are a given and puzzled students will just look it up later. In the unlikely event that a student asks a question about them, you give the (correct) answer and move on.
Asking questions is good, but you need to be prepared to dedicate some time to them. Questions about the core of your class ensure that if the answer is wrong it will actually be worth the time to revise that material.
There is also the issue that pointing out that the student misses some required knowledge could be taken as a suggestion that they are not good enough to be in your class. This is likely to hurt the student's feelings as well as those of some of the onlookers.

I'd like to add a few comments to some of the already excellent answers posted here:

Be careful about asking "recall this (potentially basic) fact" type questions.  To see an extreme example, think about me posing the question "what is 17+19?" to my Calculus 1 students.  They should of course be able to answer, but there is very little reward for answering correctly and considerable shame for answering incorrectly.  I used to ask many more questions like this when I first started teaching because I felt they made the class more accessible, but over time I learned that they actually discouraged student engagement and I have tried to cut as many as possible out of my lectures.

That said, there are certain basic facts that I would like to remind students about in my class.  For example, it would be great if my Calculus 1 students all knew off the top of their head that cos(0)=1, but many have forgotten, never learned it well to begin with, etc.  Rather than telling them this fact, calling on a particular student, or posing it as a question to the class at large, I have found success doing one of the following two things:

a. Assigning every student a partner (this happens every day in my class) and then having pairs discuss the answer with each other.
b. Posing the question to the class as a poll question and then collecting responses electronically--this forces students to think about it, but doesn't put any negative social pressure on making a mistake.

All this considered, I still think that the best questions ask students to think, rather than recall.  There are several good answers above discussing this, so I will simply ask any readers of my answer to refer to those.

Try rewarding good answers. One of my professors used to give treats (like mini chocolate bars) to students who ask good questions or answer well to his questions. This way

You encourage interactions.
You make a clear distinction between good / bad answers, but without making the bad ones looking bad.

He was always getting positive feedback in the student evaluation for this.

First of all, determine whether the students are really dumb or
intelligent.
If they are intelligent, are they giving wrong answers because of
lack of basic or per-requisite knowledge.
If they are intelligent and have basic knowledge, then do they want
to tease you or they are just careless.
Also find out how they are doing in other courses.

All the methods told in other answers need intelligence, per-requisite knowledge and seriousness of the students.
Analyze the students as told in steps above and decide how to pursue.
EDIT
Within first week of classes, teacher knows about intelligence and seriousness of each student in his class and the students (even the dumb ones) know intelligence and knowledge level of the teacher. But if you still need to find more, then google the topic. I found some interesting websites.

https://courses.lumenlearning.com/suny-hccc-ss-152-1/chapter/learning-and-intelligence/
https://www.verywellfamily.com/understanding-intelligence-testing-for-children-2162161
https://personalityanalysistest.com/highest-iq/iq-test-for-high-school-students-free-guide/
https://www.theedadvocate.org/teachers-know-understanding-measurement-intelligence-student-learning/
https://files.eric.ed.gov/fulltext/EJ1098152.pdf

How would you determine whether the students are really dumb or intelligent?

@Peter Mortensen I have edited my answer.

Corollary: What if the students are dumb?

@user253751 In some countries, there are Condition-Specific Schools for children with autism, ADHD, OCD, "language-based learning challenges," anxiety, cognitive disabilities, or mental health issues. Also there are Therapy-Specific Schools. But such schools are not found everywhere. If a child is not doing very well in school, try to find if he is good in some specific field like music, agriculture, smithy, computer graphics etc. Get him private tuition in that field.

I see a fair number of purely immediate/tactical answers and not so many structural/architectural ones, so I will try to share some structural things you can do that make this work.
Assumed:

they do not actually know the material that they should
they do not know that they do not know that material
they need to understand what they are taught in order to be able to perform acceptably as a professional
you have to teach them that

Modelling from Dr. Daniel Jankowski (Jaws**):
One of my professors was a bear.  You get into his class and he has a pile of 3x5 cards, one for each student, and instead of asking at random he works through the pile.  Everyone knows they will be called equally.  He always asks hard/important questions, no fewer than 5 per class.  Part of the rules is that if you don't know the answer, you say you do not know it, and he makes the mark, and goes to the next card.  Another piece of this is that he forces everyone to sit forward.  The center and front get the best value, so he calls the front-row the A-row, the second the B-row, and he forces the students to move to seats as far front as they can.  Their convenient cliques are disrupted out the gate, and those cliques are the ones the students are most worried about looking dumb around, not the nebulous "class".
Anger is a secondary emotion:
Your brain is required for anger.  Expections - Reality := Disappointment (anger).  It does not exist without reason.  The most important events in a trip, holiday, vacation, or such, the ones that form the kids opinion, and the latter ones in the series.  They do not remember the events as a dispassionate objective observer, and this applies to how humans process emotional events like anger or shame over time.
So how do you exploit this background?  Don't ask just one, ask a sequence.  Make the last one be something you know they know.  I like to ask in the sequence: medium-easy-hard-easy and let the brain work it out.
Finally I like to give them the tools to teach themselves.  There is an old saying that the first job of a teacher is to put themselves out of a job. It is implicit to the current class of students.  They do it by giving the students enough of the fundamentals to be capable, and then training the students to be able to teach themselves in the area.
They say that "eternal review is the price of knowledge" or "repetition is the mother of learning".  I find things I was an ace at 12 years ago have rusted nearly to dust, but if I keep the nuggets/seeds from which that tree grew, I can re-grow in a hundredth the time that former and formerly rusted capability.
A fund way to do that is "prove it" or asking if someone else can prove or disprove the wrong answer. Knowing the few axioms that you can use to test your answer is useful for re-teaching yourself.  It helps them exercise those seeds.
Best of luck.  Also, academia can be hell, and it pays poorly.  "Those who can, do; ..."  The market is hungry for capable folks, now more than ever.  A capable scientist is an asset.  Bureau of Labor Statistics says a Bachelors Chemist has a median pay of $80,000 per year, not including benefits, stock, heath, vacation, nice equipment, and such.
** Jaws.  His class was like fighting a bear.  I spent twice or three times the effort to get by in that class than it took to ace higher level classes in the same chain.  But like becoming a werewolf you are torn apart and the spirit of the wolf enters you, the spirit of that bear entered me.  In latter classes with peers who took the same Course-number from other professors, I had super-powers.  I could first-principles derive things they couldn't set up.
Bottom line: Fight the bear.  Charge the dragon head-on, because you can't lose.  Every single thing that most honest of enemies, that most noble of opponents, called truth, does it makes you more powerful than you could imagine.

Try asking the other students for a second opinion. If one student gives a wrong answer, ask the class if anyone else has an idea. You're not directly telling the first student they were wrong (and you can also thank them for volunteering an answer) so they won't feel put down.
Alternatively, there's the "you're nearly there" or "you're on the right lines" response.
If you have time, get them to work out the correct answer as a team. "What's log(3)? (You can use your calculators)". "And what's log(4)? So what's log(12)?" Write the answers on the board, and someone will spot that it's the sum, not the product.
(And just to make it more fun, and more memorable, at the next class you can bring in your ancient slide rule and invite the students to play with it...)

One technique that I was taught for cultural contexts in which it's profoundly shameful to have your mistake called out, is to give the correct answer without calling attention to the mistake:
Teacher: What's another way to write log (a * b)?
Student: log(a) * log(b)
Teacher: Another way to write log (a * b) is log(a) + log(b).
The teacher is then reinforcing the correct information. If the student isn't paying attention to what you're saying, he'll miss the correction. But if he is, he'll appreciate not being called out. Students pay more attention to what the teacher says than what a classmate says (at least this is my experience), so they will hear the correct fact and can move forward.
(Of course, you can make a mental note to call students' attention to “an easy mistake to make” later in the lecture. I don't think it's less effective for being outside the context of someone actually making the mistake.)

Of course “arguably”—because it's entirely relative to the context and the goals of the instructor. If one doesn't care what gets back to one's supervisor, or about how the students feel, the best feedback might well be, “Maybe you shouldn't be in an upper-level chemistry class if you can't do basic algebra.”

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Are extremely-time-constrained tests typical of the American higher educational system?
In this video, the guy claims that his sociology test consisted of 38 multiple-choice questions and that he only had 15 minutes to finish it. The lady claims that her control engineering test consisted of having to derive a transfer function of a double-mass-spring-damper system and that she only had 20 minutes to solve it.
To me, as a Croatian computer engineering student, those taks sound rather... extreme.A few days ago, I took a control engineering written exam, it was three tasks, all of which are arguably easier than deriving a transfer function of a double-mass-spring-damper system, and we had 90 minutes to solve it.
And I got a mild panic attack when solving the first task, my sight got dark and I was seeing sparks, and it took me around 15 minutes to calm down so that I could continue that test. If it were time-constrained, I would have failed that test.
So, I am asking, are tests such as ones described in the video typical of the American higher education?

15 minutes is a long time for 38 multiple choice questions if you know any of the material. The other depends a lot on what the lectures and homework assignments have covered.

@JonCuster: "15 minutes is a long time for 38 multiple choice questions if you know any of the material." Well, this might be true if the questions only ask for things that the students are supposed to know by heart in precisely the same form as asked. If, on the other hand, the questions are designed to require a bit of thinking before one finds out the answer, then less than half a minute per question is certainly not enough, let alone a long time - even if the students know all of the material.

Yes, in general, tests in the US are timed. There are exceptions, but that is the norm. A 15 minute test is only mildly unusual. But I had a lot of five minute "pop quizzes" as an undergraduate.
Such a quiz might or might not be a large part of the overall grade of a course, but, collectively, a set of such things might be.
Short quizzes are sort of the "stick" that goads you to study between class sessions. If you come well prepared they are not a big issue most of the time.
Even doctoral qualifying exams, if written, will normally be timed, though in hours, not minutes.
One trick in taking such short quizzes is to do it in two passes at least. Quickly answer the questions that seem obvious to you and then make a second pass on the ones that require more work. Don't get stuck on any one problem.

source: Stack Exchange

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
When teaching Computer Architecture, why are universities using obscure or even made-up CPUs? Why not x86, ARM or RISC-V?
On the FERIT University, we are using the PicoBlaze CPU to study Computer Architecture. And the same is true for a university in Argentina that the GitHub user agustiza is from. And we ran into a potential problem during COVID: what if physical laboratory exercises are canceled, and students run into technical problems trying to run existing assemblers and emulators for PicoBlaze on their computers? That's why my Computer Architecture professor asked me to create my PicoBlaze assembler and emulator runnable in a browser. Had we used x86 or ARM instead of PicoBlaze, such a problem would be impossible.
On the Faculty of Electrical Engineering and Computing (Fakultet elektrotehnike i računarstva; FER), University of Zagreb, they are using a CPU called FRISC, which was designed at FER and is even less widely used than PicoBlaze.
Why are universities doing that? Wouldn't that time be better spent teaching the basics of x86 assembly or ARM assembly? Aren't future programmers way more likely to need x86 assembly or ARM assembly than PicoBlaze assembly or FRISC assembly?

Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on [meta], or in [chat]. Comments continuing discussion may be removed.

@AzorAhai-him- Please, take it to Meta if you want to continue. I have very much not made any claim that I think this question should be on topic so please don't suggest that I have and expect me to argue a position I don't have.

Computer architectures fall into a number of different categories, but within these categories, the conceptual differences are not huge. The primary purpose in teaching about architectures is to convey the ideas, not the details of an architecture, and so it is not unreasonable to pick one that is "prototypical" for a category. Other disciplines do the same: You're not learning English as a Foreign Language reading Shakespeare or Joyce, but simpler texts. You're not learning calculus starting with partial differential equations. You're not learning mechanics using nonlinear elastoplasticity but point masses in a potential field.
To the specific point of x86: This is not a great architecture to learn from. This is principally related to the fact that it is 50 years old and is carrying around a lot of baggage for backward compatibility. For example, not all registers can be used in all instructions, it still has the weird FP stack, the FP stack registers are overlaid with the MMX registers, there are several sets of floating point instructions, etc. If you're new to processor architectures, this is really not the best one to start with. But if you've understood how CISC architectures work in general, then it will not be very difficult to figure out the differences in assembler syntax, etc. So I think it is entirely reasonable to start learning with simpler architectures first -- perhaps with ones that are simple because they are academic and do not need to address the real world constraints actual processors such as x86 or ARM ones have to satisfy.

Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on [meta], or in [chat]. Comments continuing discussion may be removed.

Do you mean "MMX" when you said "FP stack registers are overlaid with the XMM registers?

@DannyNiu Yes, this had already been pointed out in one of the comments that were moved to the chat.

I did my undergrad and masters at FER (Faculty of Electrotechnics and Computing, University of Zagreb, Croatia), and went through my computer architecture course using FRICS. And I have to say, I loved it.
The reason we were officially given (which is similar in sentiment to the speculations in several answers), is that they are teaching us the basics of RISC processors, rather than any one specific instruction set. This manifested as a number of practical advantages:

The whole FRISC reference manual was 4 pages long. The print version of Wikibooks x86 Assembly has 90 pages. Intel 80286 (processor picked at random) reference manual has 513 pages. We were allowed to have a copy of the manual in the exams, and I had a much easier time searching through a paper copy of 4 pages than 513 (and it was also much lighter to carry around).
The textbook based on FRISC came out in 2002, and a second edition in 2004. The instruction set never changed. x86 was developed based on the Intel 8086 microprocessor, in 1978, and the instruction set underwent constant changes and additions
FRISC will never be out of date -- it will always be a perfectly valid, functional, microprocessor designed primarily for simplicity and teaching purposes. Neither x86 nor ARM assembly have been designed with simplicity in mind; and which ever instruction set you select, there is a good chance you'll be hopelessly out of date in a few years.

While I eventually went a different direction, computer architectures was one of my favourite subjects during my studies. I'm sure that in good part, that is down to how it was implemented. Specifically, after working through a number of problems and examples in FRISC, I felt ready to tackle any assembly, regardless of the length of the manual or size of the instruction set, because I understood the governing concepts well.
We applied the same principle in other courses as well. For example, we also worked with our bespoke version of an embedded OS (as part of the "Embedded Operating Systems" course), which we built from the ground up, rather than studying something off the shelf such as Android. This allowed us to study the core concepts, rather than focusing on specific implementation flavours.

Last time I looked, the Intel x86-64 architecture reference was ten volumes.

@Mark That sounded so incredible that I went googling: https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html It is indeed ten volumes and the Instruction Set Reference takes up four of them, with page counts of: 735, 744, 725, and 326 pages for a total of 2530. That is mind-boggling.

The question is similar to "when you learn English, why do you read obscure or even made-up texts instead of real-world texts like Shakespeare or James Joyce?", or "when we learn Newtonian mechanics, why do we perform carefully controlled experiments instead of looking at real-world events?"
And the answer is the same: Real-world texts/CPUs/events are complex, hybrid beasts which defy simple categorization. A professor of mine got almost angry at me when I asked him "and how does the Pentium (yes, it was back then) fit in the CISC/RISC scheme?" because it incorporates elements of both (pipelining, prefetch  and a complex instruction set): "It is a hybrid mess and we can learn nothing from it."
You learn concepts first, and then you apply them to the mess you find outside the lab.

Except as correctly pointed out in other comments when learning (foreign) languages you do start with English (a comparatively complex language) straight away rather than a simplistic language just to teach the concepts. Not saying that hiding complexity isn't good (just like when you teach English you will still start with teaching patterns, even if those patterns barely hold in the long term), but there are many ways to hide complexity beyond implementing your only idealistic alternative~

@DavidMulder When learning English, you start with English. When learning x86 assembly, you start with x86 assembly. But OP wasn't asking about an x86 assembly course, but a course called "Computer Architecture".

@Sören Learning any language usually starts with "say Maa-maaa!" ;-).

@Fe2O3 Interesting, same here! We each spoke to our son in our respective mother tongue, and that worked really well. And I once had a "semi-bilingual" French-German girlfriend whose German transitioned over the course of a few ears from "incomplete and improvising" to "colorful and creative" ... natural language is fascinating. Sometimes you have a bit similar hybrid languages: Functional Linq being added to imperative C#, or inline operator calls vs. functional notation.

Because real life CPUs tend to be overly complicated due to features market is paying for, so it is much easier to learn from a made up architecture to get the principles, then you try to sort out the bane of real life architectures.

Not just deliberate "features", but also weird quirks like x86 memory segmentation or MIPS visible branch delay slots, which get in the programmer's way but have to be kept around because of backwards compatibility.

@dan04 That is what I meant by 'features market is paying for'. Obviously that from a computer architecture perspective retro compatibility always gets in the way of performance and programability, but market pays the developers' salaries, not the other way around.

The use of made up/simple CPU's has a long history.
https://en.wikipedia.org/wiki/The_Art_of_Computer_Programming was originally written in MIX https://en.wikipedia.org/wiki/MIX_(abstract_machine) a made up 6 bit assembly language.
This has now been replaced by MMIX a made up 64 bit RISC architecture https://en.wikipedia.org/wiki/MMIX, as Knuth said.
"MMIX is a computer intended to illustrate machine-level aspects of programming. In my books The Art of Computer Programming, it replaces MIX, the 1960s-style machine that formerly played such a role… I strove to design MMIX so that its machine language would be simple, elegant, and easy to learn. At the same time I was careful to include all of the complexities needed to achieve high performance in practice, so that MMIX could in principle be built and even perhaps be competitive with some of the fastest general-purpose computers in the marketplace."
So the use of made up/simple CPU's has a long history.
The rationale of creating an easy to use machine language that illustrates the principles is still there.  I think I remember there being a discussion about MMIX or ARM for the replacement of MIX, but it was a while ago, and did not really concern me.
A lot of Computer Architecture courses use/used MIPS since it was both real world and one of the original RISC implementations.  Stanford MIPS vs Berkley RISC.  MIPS became a CPU and RISC ended up the name for the family of CPU's.
RISC has less to learn and thus is easier to teach.

Kinda surprised how you got so far, but - especially in theoretical subjects like CS - the concrete content of a lecture is often just an example for the more abstract concept(s) that are actually being taught.
As an analogy: You're not supposed to remember the solution to specific integrals in calculus. You're supposed to realize how integrals work in general and how they can be used. [Then you MAY take deep dives in specialty classes about it]
So of course your prof talks about a massively simplified CPU instead of  the known-bloated, absurdly complex (and also potentially outdated) x86. Because close to zero programmers will ever need concrete knowledge of x86 commands. What they need is a rough idea of how assembly works and what it is.
Because what use are the intricacies of x86 (probably only present due to legacy reasons) when the current trend is ARM anyway? And what use would be going hard in (for all students) on ARM if that turns out to not be the future?
Instead, you present a model architecture in which you can clearly and easily demonstrate the abstract ideas that CS students need as a baseline.

ne nice thing about using a soft core like a picoblaze for this is that students can easily go on to add the features of a modern processor, caches, branch predictors, deeper pipelines, and then study the tradeoffs by actually running the resulting bitstream on a suitable FPGA. You can tweak the processor to your hearts content and see how the changes impact execution of a test program. One cannot do that with hard IP.

These aren't all fake, frequently a CPU is just no-longer in common use or used in unusual applications.
Micro and Pico Blaze CPUs are a real thing.  They're a design used often to add a CPU core to an FPGA project.  Similarly MIPS R4000 CPUs were real so all the computer architecture books that use them are based on a real CPU even if classes do everything in SPIM and MARS now.
Both of these have significant commonality with modern RISC-V CPUs.

Architecture is not the same as assembly language programming.
When I used to teach programming at the University of Hertfordshire, UK, the computer architecture course involved the students building a CPU from the ground up (using logic gates, but done in a circuit simulator).  It was only possible because it was a 4 bit CPU with just 16 memory locations (of 4 bits) and at most 16 instructions.  You couldn't do much with such a machine, but I think they learnt a lot in the process.
One of the little programming exercises I gave them was to write a software simulation of the instruction set, but even back then (in 1990), most programmers would never actually write any code in assembly language.

Same here, but to add insult to injury the simulator was built inside FORTRAN V (yes, that's not a typo, Fortran 5), which we all had to learn to do the lab exercises.  And most of my classmates had never used any version of FORTRAN before...

You had FORTAN-V? We had to do it in FORTRAN-IV. Wasn't a problem for the PDP11 instructions, but Data Structures (linked lists, for example) and Compiler Construction were somewhat complicated without pointers or recursion support.

Many years ago as a student, in addition to the reasons give in other answers, I was told one of the reasons the class was taught using MIPS instead of x86 was to discourage a specific form of cheating.  With x86 it would have been relatively simple to write the assignment in C/C++, run a disassembler on the output and then turn that in as your work.
With virtualization and cross platform compilers much more widely available today, I suspect the deterrence value is less than it was.  OTOH C and C++ are no longer widely used first languages making the other half of the potential cheat harder.

Amusingly, I teach the C++ sequence which leads into our school's architecture & assembly course (in MIPS). On the very last day I recommend and show to students that they can write future assignments in C++, compile, and check disassembly for clues on their later assembly work. But I highly doubt anyone's ever followed through with that.

@DanielR.Collins I assume the biggest gotcha would be not getting compiler settings right.  Any debug support or optimization would complicate things well beyond the naive easy to understand assembly the students would want.

I'll say that for the guts of a few simple functions I've tested it on (with GCC), that hasn't struck me as a problem. Probably identifying what parts of the function boilerplate/setup/return can be elided/ignored strike me as a bigger issue.

In defense of the instructors, such as tenured/tenure-track professors and visiting/adjunct professors, and teaching assistants (T.A.s), it takes a lot of work to create/update a set of presentation slides, lecture notes, laboratory/lab assignments, and course projects for courses on computer architecture, or even their requisite course on computer systems.
This has to be done in addition to preparing for the lessons that they teach (or lectures, if you like), lab sessions that they manage, and recitation/tutorial sessions that they lead/teach. Also, they have to create/update and grade assignments, course projects, and examinations.
There is a need to find a working toolchain for the chosen instruction set architecture (I.S.A.) for the computer architecture course. Commercial/Proprietary toolchains, such as those commercial electronic design automation (EDA) software, require technical support by the teaching assistants/T.A.s. Open-source EDA software can alleviate the problem, but still need  more industry buy-in. If a lot of hiring managers create job descriptions that include open-source EDA tools and recently created hardware description/construction languages (HDLs/HCLs), such as Chisel HDL, PyMTL, and PyRTL, a lot of T.A.s would support the use of such open-source EDA tools, HDLs, and HCLs.
Using the x86-64, including Intel 64 (Intel's version of x86-64), as the I.S.A. to teach computer architecture is a nightmare. I.S.A.s based on Complex Instruction Set Computers (CISC) are much harder to teach than I.S.A.s based on Reduced Instruction Set Computers (RISC). Hence, using x86 I.S.A. to teach 32-bit processor architectures is no better.
ARM I.S.A. is a RISC I.S.A., but still contains enough complex/complicated instructions that make teaching annoying.
This leads many professors to choose between ARM I.S.A., which has increasingly been used in embedded systems, and MIPS I.S.A., which is not adopted in new products for embedded systems and other computer systems.
The PicoBlaze I.S.A. is from Xilinx, Inc., and comes with a supported toolchain to help people learn to use it in designing processors on its FPGA boards, and develop software in assembly language and compilers.
This leaves RISC-V I.S.A. as a good option that allows students to share their projects online, which helps reflect the quality of their skill set while working on such projects. RISC-V International (previously RISC-V Foundation) had a Web page that shared university teaching resources for RISC-V and associated toolchains for simulating/emulating RISC-V processors, and assembling/compiling computer programs in assembly languages. It also contains benchmark programs for validating implementations of RISC-V processors in Register-Transfer Level (RTL).
But, it still takes work for instructors and T.A.s to familiarize themselves with a new I.S.A., toolchain or EDA tools, and update course materials for the new I.S.A.. This can be resolved if they are rewarded with grants by their academic departments to do so. If you want to speed up the process, you, some rich people who you are connected to, or crowdfunded sources can donate money to your academic department to speed up the process.

To share a slightly different perspective: I used to teach assembly language in x86, using Kip Irvine's Assembly Language for Intel-Based Computers. This was about 20 years ago; a few things had become awkward at the time, and they'd be moreso now.
One is getting access to tools. There was a time when Microsoft Macro Assembler (MASM) was a standalone product; this book (4E) came with a CD with a version for students. Nowadays this isn't an available standalone product, and it would be a lot harder to procure and run tools like that.
Two is that there's a lot of overhead and increasing security barriers to make actual native (say) Windows executable programs. Traditionally we'd ramp-up students by having them make simple Windows .COM files, but that option is no longer available. (So: steeper onramp.)
Three is that the ability to run native code is more and more buried under countless layers of system architecture, virtualization, and so forth. One of my favorite things as a student, and I'd still do it with my students, was to take control, read and write to a floppy disk from assembly. Even at the time I was teaching, it was getting hard to dig up old floppy disks that we could use for this exercise. There was an instruction (INT 21h, Function 7305h; see Irvine Ch. 14) that would let you read and write disk sectors directly; this worked on the Windows 95 line, but was defunct in the Windows NT line with its tighter security system.
That said, I'm not entirely sold on abandoning use of the widely-used x86 architecture -- just like I think using a widely-used real-world workplace programming language is of benefit, while some others differ. When we were discussing who would take over my current school's architecture course about 6 years ago, my instinct was still to use the Irvine text for x86. Another instructor took it using MIPS instead (Patterson text).

[Microsoft] Windows .COM files, oRLY? Will NTVDM load the WoW layer when tasked with running a COM binary?

@IncnisMrsi: NTVDM doesn't exist in Windows 11 or any other in 64-bit variant.

My opinion is that it is better to teach computer organization with an architecture that is fully defined and without unanticipated/unknown side effects. It reduces the complexity of grading assignments. It also doesn't bias the students towards any particular architecture they will encounter in the wild.
When the instruction set is easy to decode it is easier to write assemblers and disassemblers, which are both common assignments.
One last thing is that you don't have to deal with copyrights on existing instruction set architectures.
I first learned pdp11 assembly in 1978, then 6502, 8080, pdp8 and TMS1909. Never had a problem picking up any other to this day.

Proofs that “architectures”, commonly used in teaching, are fully defined? Note that answers on StackExchange are not about opinions.

As an addition to the answer provided by Wolfgang, by using more esoteric architectures, you begin to think critically by figuring out what in a computer architecture works and what doesn't by giving a comparative analysis to a student of the subject whom might otherwise bring in pre-conceived notions about what is good/bad about an architecture. By studying something they are almost certainly unfamiliar with, they can make their own educated decisions about the study.

There are already multiple great answers here. I just want to add an anecdote that is just a little long for a comment and in some way also practically answers the question so I thought an answer is a better fit:
When I was an undergraduate student (Computer Engineering), we had two Computer Architecture/Organization courses that used MIPS and were taught using the Patterson and Hennessy textbook that also used MIPS. The next year we had an Embedded Systems course that used an ARM microcontroller and we spent a lot of time on its assembly in the course (in addition to C). For the students that mastered the material on MIPS assembly in the previous courses, the transition was very smooth. I highly doubt we could have learned the concepts as easily had we started with the ARM microcontroller assembly.

When I took a Digital Logic course for fun at Carnegie Mellon, we used a toy CPU that was designed for the course. The advantage was that it was designed with a dozen or two instructions with a full System Verilog FPGA implementation to modify and brief 10-page manual (in big font). A real-world processor necessarily has to be performance-focused and cannot be modified easily from semester to semester. The didactic CPU gets the very basics across so that later courses can focus on more complex optimizations and design quirks.

As an example, for a bit of light reading check this paper
https://eprint.iacr.org/2024/002.pdf
which discusses the matrix multiplication instructions in your iPhone and how to use them for post-quantum encryption. That's not something that you can throw at the average student.
Start with something simple that students can actually understand and learn, and then use that as a starting point.
And complex instructions are not the problem; the problem comes when you look at the actual implementation. Any question that a student could think of, the correct answer is "it's complicated".

Often times such tools are developed mostly with one goal in mind, namely to teach you concepts.
You can look at it from a different angle. What if indeed you go along with a popular architecture? You might get so accustomed to it, that you will fail to grasp key concepts just because what you have picked has them in a specific way or maybe hides something for the sake of convenience.
You can observe this with many self-taught software developers - they go for language X, get familiar with what it offers but once they have to switch to something very different, their stellar programming skills get demolished. Try switching between C, Haskell, VHDL and Java and see what happens. This is because they know the syntax, they also know many of the functionalities the language offers but they don't really know what exactly happens underneath. Perfect example for this is web development in general. While creating a simple button with React or whatever and showing on the screen does give you instant results, many forget that this button is running inside a web browser on an operating system. Alone the web browser is a very complex piece of software not to mention everything around it. And the button itself follows a specific set of design decisions made by the people behind the library you are using. If you don't have UI and UX expertise, yes, you will be able to create something by stitching things together but you will probably never be able to come up with something very unique.


text:
Are people with a mental illness advised against pursuing a Masters degree in some difficult topic (such as computer engineering)?
I have just graduated with a Bachelor degree in computer engineering. Most of the students who get a Bachelor degree at my university go furhter to pursue a Masters degree. However, I have a mental illness, a psychotic disorder (a mixture of Risperidone, Biperiden and Alprazolam appears to help). Many people on the Internet are advising people with mental illness not to pursue a PhD, because PhDs are tough on mental health. I am wondering, is pursuing a Masters degree in computer engineering also tough on mental health?

I don't think we can give an answer that's useful to you, because your issues are far from the most common mental health issues and hence the appropriate advice for you might be completely different.  Also, it matters what your alternatives are - for example I'm sure homelessness is much worse on mental health than grad school.  I would strongly suggest you consult your doctor(s) and or therapist(s) instead of strangers on the internet.

If you can manage your mental health issues, you should be fine in an MS. Usually, you just take a bunch of classes that are slightly  more interesting than the classes you already did.
Ph.D. are hard on mental health, because Ph.D. students have to deal with certain temptations, such as the impostor syndrome (a Ph.D. should make you the world's specialist in a very small subfield), the feelings of discouragements because Ph.D. students do not feel the progress they are making, and other challenges. Now, if you have access to a therapist, a lot of these problems are much more manageable. Having an understanding Ph.D. advisor also helps. So, I would not conclude a priori that you cannot do a Ph.D. The reason that it might be a good idea is because R&D tend to be more tolerant of personality quirks, which of course in your case are often a syndrome of you illness.
The MS is often very similar to two years of undergraduate studies, but with classes almost exclusively in your chosen major.
Individual factors are very important here. For example, if you have to worry about finances, you have a very high stress factor. The risks of trying out an MS are limited, because leaving after a semester does not cost you a lot. Finally, holding down a job might be equally challenging, unless you have an understanding employer. You might be surprised which big employers are actually good to people with mental illnesses, as long as they can be productive.
In summary, I would advise you to not exclude any options, to talk it through with a therapist (who is trained to elicit your feelings and helps you deal with them), and to minimize risks in your planning.

The overall stress level is only one factor, and something we can't help you determine because it will depend on your university and program of choice.
What is more important is to find out whether your mental condition precludes you from independent, self-directed work over a long period of time, which can be a specific sore point tied to specific disorders. Bachelor degrees often have a much higher level of hand-holding. The same tasks can feel entirely different in terms of stress if they are to be done in a supportive, restrictive, or free-form environment.
It's generally a good idea to take calculated risks in life. However, in this specific scenario, you really need to be asking your therapist about it so as to develop an understanding of your strengths and weaknesses and how your condition ties into that. Internet strangers like me cannot help you or if they do, it will purely be by accident. This is because we lack a clear and sufficient understanding of your circumstances and your disorder.


text:
Can I request the code behind a research paper from the author?
I am in the field of computer science. It is often the case when I am reading a paper I start to wonder, "Wow stunning results, however, I would like to prove that." or "How exactly did he get these amazing results? He/she just wrote a rough overview of the real methodology used in this paper.". As you can see, a lot of times the small things have a huge impact on the overall performance of the underlying methodology. Often they are not part of the paper or not revealed at all.
My idea would be to contact the paper writer, to ask for his research programs to recreate them and understand them. Can/should I do that?
I personally think that there are probably not a lot of researchers, who would let somebody else "look at their cards". What's your experience with that?

I think this question is no different from http://academia.stackexchange.com/questions/1967/requesting-raw-data-from-previously-published-research?rq=1 and http://academia.stackexchange.com/questions/1401/how-to-get-the-data-to-reproduce-a-published-result?rq=1

@mmh Those questions are about data; the answers may or may not be the same for source code. (For example, authors may feed differently about releasing buggy or "ugly" code than about sharing raw data in whatever form it is in.)

FYI: Reference on availability of source code used in computer science research articles?

I have successfully asked and received code (binary) at a time where this was no standard. But this depends on the authors.

I would ask authors. Often they are happy to share. Many journals require it to be shared. But i am in biology field.

Related: https://academia.stackexchange.com/questions/10247/why-are-cs-researchers-reluctant-to-share-code-and-what-techniques-can-i-use-to, https://academia.stackexchange.com/questions/96356/can-one-demand-to-see-code-used-to-generate-an-article/96358#96358

Might be an unpopular opinion, but if the authors of a paper don't give you what you need to reproduce their results, I would encourage you to consider to briefly and factually point it out in follow-up work, when discussing the paper in question, if this makes it more difficult to compare to them. That's of course a bit embarrassing to say, but helps the rest of your community to know about the situation.

Ask for the code. Please do, however, explain why you want it and what you intend to use it for.
Personally, I would be quite happy if someone contacted me about my research, and would try to give all the necessary tools to recreate my data. Especially so if I am not currently working on a follow up piece.
That said, I've asked for parameters, codes, procedures etc. several times from the authors when the description in a paper has been vague. I've had a lot of different responses: Some have plain ignored me, others have given me everything I asked for, and yet others have only obliged when I've suggested that I might be willing to put them as co-authors if I built upon their code in a way that leads to a publication. Finally, some have refused my request. This has happened for a number of reasons, for example those discussed in this question.
If you ask for code and say that you just want to verify some of the conclusions of the authors or use it as a reference for your own implementation, you can most typically expect a refusal or no reply. This, at least, is the experience I've had.

Is it possible that your inference about the motives of those who've refused your request is mistaken? Could it possibly be that they are acting in good faith, and have given you an honest reply? After all, telepathy is a very tricky business to get right (AIUI there isn't a single proven case of it ever working), so perhaps yours isn't infallible.

@EnergyNumbers I believe that here it is you who is employing telepathy: Of course I am not writing out the specifics of a private matter on a public forum, which you seem to be assuming as you make your rather bold judgements. Some of the cases I am referring to, upon further communication, were rather clearly situations where the codes were not trusted by their authors. Naturally, your first assumption should always be that people act in good faith and mean what they say, which is why I in my answer felt that writing out a possible ulterior motive explicitly would bring more value to my text

I'm afraid you are mistaken: rather than bringing more value to your text, its churlishness detracts from it.

@EnergyNumbers Seeing your point that my text can be understood in a way it was not meant to, I have edited it. In the end, though, I suppose we'll have to agree to disagree: I feel that my answer now is more PC, but contains a tiny bit less information.

@amlrg Thx for your encouraging answer! Any suggestion how do you contact the author? Would appreciate it if you could show me one of your mails...

Yes, it is fine to ask. From my experience, not many researchers share their code. Sometimes the reason is that the authors are afraid that you will write a better algorithm or that you will extend their work before them. Some other reasons may be that the software has no documentation and they don't have time to prepare some documention, is not written in english, or has dependency to commercial software or software that belong to other authors. However, there is a lot of reasons for sharing the code. It gives more visibility to your work, helps other researchers so that they don't need to reimplement your work, allows for a more fair comparison when comparing algorithms, etc.
Personnally, I have asked the source code or datasets of other authors several times. If they don't want to share, they usually just don't reply to the e-mail, or they may say no. But there is no consequence to asking. So just ask. Besides, sometimes the authors will not provide the source code or datasets but often they can still give you the binary files. In that case, it can still be useful.
Personally, I share the source code  and datasets  of all my research papers as first author as part of an open-source data mining library ( http://www.philippe-fournier-viger.com/spmf/ )and I believe that all authors should also share source code and datasets. Here is a blog post where I explain in more details why it is important to do so: http://data-mining.philippe-fournier-viger.com/why-it-is-important-to-publish-source-code-and-datasets-for-researchers/

what do you mean by sharing the binary files ? could you please clarify these point ?

Ok I will explain. To write a program, a programmer has to write some code using some programming language. Then, generally, the programmer "compiles" the program to convert it into an executable (a software that you can run on your computer, such as an .exe file on Windows).  That executable file is what we also call a "binary file".   Thus, if a researcher give you its source code (the code), you can modify his software. But if a researcher give you its executable files (binary files), then you can only run the program but you cannot modify it. Hope it is clear.

I think it is perfectly fine, and I encourage asking for the code. I actually support the position that any published results based on software are worth next to nothing if the authors are not willing to publish the source code along with them. If they have not already done so when publishing their paper, I find it their moral obligation to do so as soon as possible or at least upon request.
If the reason for authors not publishing their source code is that they do not fully trust their own software, then the results should not have been published at all. Why should anyone trust your results if you are not willing to defend the way you produced them?

It's absolutely acceptable to contact an author and ask for their code - and in my experience, a good portion of researchers are more than happy to share their code. While yes, there are some who won't want to let someone get a glimpse into their work, this isn't a universal stance.
A few things to note:

You are asking for a favor, please do recognize it as such. Preparing code is not a zero-effort activity. For example, if you're talking to researchers doing human subjects work, there's potentially data that needs to be stripped out. Even if there isn't, it's possible that code for ongoing, as-yet unpublished research needs to get stripped out, comments cleaned up, things like that.
When asking for someone's code, do make it clear what you're planning on using it for. Beyond making it more likely for your request to be met favorably, it'll be useful for helping the person providing the code know what it is you need. For example, do you want to build on their stuff? Simply reproduce their results? Something else? There might be things you need to know that are purpose-specific.
If you intend to spin things into a paper, you might want to get them involved in that as well.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/