"Not" gate

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

"Not" gate

ron2308
I would be grateful for assistance.
I'm a newcomer self study student.
I inserted my solution to the Not gate sub-project, but there was that red remark at the bottom of the page
"Chip 1 is not fiound in the working and built in folders".
The truth is that it was'nt really my answer - I figured it out by going throug answers to questions in relation the the gate, from this forum. I do not see consistency between the in and out interface, to the solution.
I would be grateful for an explantion of what the error message means.

Thank you all
Ron
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

WBahn
Administrator
In general, that error message comes up when the part being tested tries to load another part and the file for that part is not contained in the working folder and is also not one of the built in parts.

It usually tells you the name of the chip you are trying to load, but "1" is not a legal chip name and so if you tried to use that it should give a different error.

Post your code for your Not gate and let's take a look.
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

ron2308
This post was updated on .
Thank you so much for your help - I am really desparate.

My code is as follows:

MOD NOTE: Code deleted

Thanks a lot, Ron
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

ivant
ron2308 wrote
Thank you so much for your help - I am really desparate.

My code is as follows:

/ File name: projects/01/Not.hdl

/**
 * Not gate:
 * out = not in
 */

CHIP Not {
//SKIPPED
 ]

Thanks a lot, Ron
The code opens with { but closes with a ]. Should be } instead.
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

WBahn
Administrator
ivant nailed it. So I'm going to delete your code since it's served it's purpose. Let us know if that doesn't solve the problem.
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

ron2308
Thank you very much, I hope that I solved the problem.
I'm writing here the message I receive after going over the test script.
Does it mean that the execise was processed well, that I can submit it and also use and rely on the Not gate as a basis to the further exercises.
I would be obliged to your answer, and I am grateful for your help.

"End of Script - - Comparison Ended Successfully"

Thanks,

Ron
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

WBahn
Administrator
It a "necessary but not sufficient" condition.

If you don't get that message, it means that there is something wrong with your code (assuming the test script is correct, which at this point is a very safe bet).

But with the exception of the simplest gates (and the Not gate does fall into this category) it is difficult if not impossible for the test script to test everything, so it just "spot checks" for the more common errors that the authors thought students were likely to make. Hence it's possible to pass the tests for a chip but for it to have undetected errors that don't make themselves known until later.

If you think that will make tracking down the problem that much more difficult when it raises it's ugly head, you are absolutely correct. You can ask Intel about that with regard to the Pentium floating point bug that cost them nearly half a billion dollars to fix.
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

ron2308
Thank you very much, I am grateful.
Ron
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

ron2308
thanks so much for referring me to the Intel Pentium Floating Point Bug. Most interesting, although I have a very meager knowledge of how to understand it, but it will enhance my desire to acquire more knowledge. What is also interesting about the issue (first I read the Wickipedia item) is Intel's reaction of not revealing, than admitting and than replacing. Quite similar to what is considered to be a pattern of human reaction towards painful news - first self denial, then gradually accomodating to the news.
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

WBahn
Administrator
Companies often respond to situations much like humans do -- which is not surprising since companies are nothing more than collections of humans.

If I remember correctly, the processor had a $700 retail price tag and so Intel quite naturally didn't want to have to wholesale replace or refund that kind of money, even at their cost. Their initial response saying that the errors were negligible and couldn't result in a meaningful problem were largely taken at face value because Intel enjoyed a pretty positive reputation as a company that could be trusted. When it was rather quickly shown that it was possible for the bug to produce large errors (using specially contrived input values), most people assumed that Intel simply hadn't known that to be the case and, well, that happens. But as Intel kept downplaying the nature of the bug even as more and more "everyday" examples of significant errors were reported, people started getting suspicious. At that point they offered to replace any affected processor that could be shown to have actually caused a meaningful problem. That pissed people off because that would be like saying that they would replace parachutes that had a known defect only if you could show that you were injured as a result of it not opening. But what REALLY sent people over the edge what when it was discovered that Intel had known about the problem much, much earlier than they claimed they had and had just hoped that no one else would notice -- and, in point of fact, it did require a lot of very sensitive and extensive analysis for someone to spot it.

It would be interesting if we could spawn a parallel universe and see what the impact of a different handling of that bug would have had. Imagine if Intel leadership had sat down and, after being told of the issue and having a real good cry, had issued a press release describing the error, stating that it was not believed to be capable of causing significant errors for the overwhelming majority of users but that this couldn't be ruled out, and offering to replace any affected processor at no charge. The total number of processors that they had to replace may or may not have been similar to what actually happened, but I think that the prestige that Intel would have garnered would have more than overshadowed those costs as people chose to use Intel because they knew that Intel would have their back.
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

ron2308
It is amazing that you seem to remember the price of the chip after so many years. Of course the track you offered at the end of the post was much logical for the company, it would have put them in a much better place than their conduct in fact brought them. it is pity that they have acted the way they did. I used to work as a secretary in a law firm for 12 years, and I remember once an applicant sent an appeal to court to enlarge the number of judges in his file, attaching a very much proved data that the more people are involved, the better chances of a correct judgment. His appeal succeeded.  In intel's case they did not behave accordiangly
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

Sergey
In reply to this post by ron2308
 I see all have the same problem on start. Use built-in Not.
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

WBahn
Administrator
Sergey wrote
I see all have the same problem on start. Use built-in Not.
No, don't use the built-in Not, do what you are supposed to do and implement the Not gate using only Nand gates. If you have problems with doing that, they need to get resolved before moving on. Otherwise you will just run into the same problems but with an even more complicated part.

Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

ron2308
Thank you Sergey, I'm obliged.
Ron

‫בתאריך יום ב׳, 15 בפבר׳ 2021 ב-18:56 מאת ‪WBahn [via Nand2Tetris Questions and Answers Forum]‬‏ <‪[hidden email]‬‏>:‬
Sergey wrote
I see all have the same problem on start. Use built-in Not.
No, don't use the built-in Not, do what you are supposed to do and implement the Not gate using only Nand gates. If you have problems with doing that, they need to get resolved before moving on. Otherwise you will just run into the same problems but with an even more complicated part.




If you reply to this email, your message will be added to the discussion below:
http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Not-gate-tp4035528p4035679.html
To unsubscribe from "Not" gate, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

Lozminda
In reply to this post by ron2308
As I'm procrastinating, here's my money's worth.

There are examples of companies doing the "right thing". Because they avoided a scandel they generally aren't remembered. Human tendancy to focus on the negative. An example of a company doing the right thing is the "Perrier bottled water Benzene" episode (wikipeadia). All though there's other critique that is less 'kind'. Certainly from my perspective in the UK it looked like they got away with it. BTW I'm a tap water person.

In future builds I think it's recommended that you use the built in chips, when things get more complicated..

Lozminda
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

WBahn
Administrator
Most companies do the right thing nearly all of the time, whether they be big or small. The very fact that it is such sensationalistic news when they don't is actually one of the surest signs that it is rare -- if it was common it wouldn't be news.

It is recommended that you use the built in gates in a couple of places. Midway through the memory build it is recommended that you use the built in gate for a midlevel memory. This is purely for simulation speed purposes, though today's machines might not really need that. Then when implementing the CPU it is recommended that you use the built-in gates for some specific parts so that you gain access to the GUI interfaces that are part of the built-in versions.
Reply | Threaded
Open this post in threaded view
|

Re: "Not" gate

ron2308
Thanks a lot Lozminda, I will view the episode you've mentioned.
Thanks a lot also to WBahn - I will take your advice in mind, when I progress in the course.
Ron

‫בתאריך שבת, 13 במרץ 2021 ב-4:43 מאת ‪WBahn [via Nand2Tetris Questions and Answers Forum]‬‏ <‪[hidden email]‬‏>:‬
Most companies do the right thing nearly all of the time, whether they be big or small. The very fact that it is such sensationalistic news when they don't is actually one of the surest signs that it is rare -- if it was common it wouldn't be news.

It is recommended that you use the built in gates in a couple of places. Midway through the memory build it is recommended that you use the built in gate for a midlevel memory. This is purely for simulation speed purposes, though today's machines might not really need that. Then when implementing the CPU it is recommended that you use the built-in gates for some specific parts so that you gain access to the GUI interfaces that are part of the built-in versions.


If you reply to this email, your message will be added to the discussion below:
http://nand2tetris-questions-and-answers-forum.32033.n3.nabble.com/Not-gate-tp4035528p4035830.html
To unsubscribe from "Not" gate, click here.
NAML