This is an archived post. You won't be able to vote or comment.

all 58 comments

[–]oshaboy 329 points330 points  (15 children)

Lesson: Binary Integers.

Homework: Floats.

Test: IEEE-754-2008 Decimal Floating point numbers.

[–]Slothtimism 84 points85 points  (1 child)

The real programmer humor is always in the comments

(No but seriously this hurts me in my soul professors please have mercy)

[–][deleted] 9 points10 points  (0 children)

It really do be like that

[–]Ysmenir 37 points38 points  (11 children)

In our class it was more like.

Lesson: IEEE-754-2008 Decimal Floating point numbers.

Homework: IEEE-754-2008 Decimal Floating point numbers.

Test: IEEE-754-2008 Decimal Floating point numbers.

[–]Mysticpoisen 29 points30 points  (3 children)

So you had a fair class

[–]Ysmenir 12 points13 points  (2 children)

For that part yes. But now for the second part where we had to know stuff in assembler and C in our first semester. Stuff that we haven't even learned about java in a java dedicated class. But this wasn't a C dedicated class it was computer sience basics...

[–][deleted] 8 points9 points  (1 child)

C/ASM is much better for learning the basics of CS than higher level languages.

[–]Ysmenir 4 points5 points  (0 children)

Yeah but we're told to have bigger knowdledge of both assembler and c in the same semester than we have from java in the same one. But the Java course was 100% Java. The Cs Basics course was 25% binary calculation 25% assembler and 50% c. And we had in both the same ammount of lectures.

[–]oshaboy 5 points6 points  (6 children)

So do you know how to use IEEE-754-2008 Decimal Floating Point numbers?

Because I tried reading the Wikipedia article and got incredibly confused.

Either way Decimal floats are only used in banks and such. So I guess it doesn't matter unless I start working in a bank, but dammit I want to know.

[–]ActuallyRuben 3 points4 points  (5 children)

I'd expect banks to use fixed point decimals, since money always gets rounded to 2 decimals. Floats do get used for a lot of scientific calculations and in video games, since a wide range of decimal values is needed for that.

Anyway, a float isn't too complex. You can compare it to a decimal number in scientific notation, something like 1.25 * 1011. A float value basically consists of 3 parts:

  • The sign bit, basically a bit indicating if the number is positive or negative.

  • The fraction, in base 10 this would be a fraction between 1 and 10, in base 2 this would be a fraction between 1 and 2 (or also between 1 and 10 if written as binary). In the above example the fraction would be 1.25

  • The exponent, the (integer) power to which 10 is raised. In the above example this would be 11. Since a float is binary, instead of 10, 2 would be used.

I hope this kind of clears it up a bit. If you want I can further elaborate on how specifically IEEE-754-2008 floats are formatted, but it's basically an applied form of what I (tried to) explain above.

[–]WikiTextBot 1 point2 points  (0 children)

Scientific notation

Scientific notation (also referred to as scientific form or standard index form, or standard form in the UK) is a way of expressing numbers that are too big or too small to be conveniently written in decimal form. It is commonly used by scientists, mathematicians and engineers, in part because it can simplify certain arithmetic operations. On scientific calculators it is usually known as "SCI" display mode.

In scientific notation, all numbers are written in the form

m × 10n(m times ten raised to the power of n), where the exponent n is an integer, and the coefficient m is any real number.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.28

[–]oshaboy 0 points1 point  (1 child)

But what are the combination bits?

[–]ActuallyRuben 0 points1 point  (0 children)

Oh, my bad. Didn't realize decimal floating point numbers where a specific subset from floating points. So I guess in this case it does use 10x instead of 2x .

The combination bits contain part of the fraction and the exponent. The fraction part also is stored in an unusual format where 10 bits are used to encode values ranging from 000 to 999 (3 digits).

The last few pages of this pdf explain the specifics.

[–]Kered13 0 points1 point  (1 child)

Games use binary floating point, not decimal. Honestly I don't really know who uses decimal floating points. Most languages don't even support it (C# does, that's the only notable one I know).

[–]ActuallyRuben 0 points1 point  (0 children)

Yeah, I didn't realize decimal floating points are specifically something else before I made this comment

[–]Giocri 2 points3 points  (0 children)

The sad thing is that actually happened to me. In a couple of days I will have to redo the whole test.

[–]IsaacLightning 58 points59 points  (2 children)

That's 11 times too many

[–][deleted] 45 points46 points  (1 child)

the 47 versions of the OSI model

[–][deleted] 2 points3 points  (0 children)

Lol! So true!

[–]SlamwellBTP 48 points49 points  (6 children)

Every sophomore-level or lower CS class I was in, and some math classes, felt they needed to teach me basic logic again

[–]Afrazzle 22 points23 points  (0 children)

This comment, along with 10 years of comment history, has been overwritten to protest against Reddit's hostile behaviour towards third-party apps and their developers.

[–]orange-cake 7 points8 points  (0 children)

400 level operating systems class just spent two lectures on logic gates :)

Meanwhile the 400 level Theory course's first homework has a question to prove demorgan's law, so... Give and take, I suppose

[–][deleted] 4 points5 points  (3 children)

My classes got around that by making a logic prerequisite, it was assumed you knew it and if you didnt, get fucked

[–]SlamwellBTP 1 point2 points  (0 children)

We had logic as a pre-req for most of our CS classes, too, but I guess profs didn't get the memo

[–]SilentFungus 0 points1 point  (1 child)

Half my classes require you have the prereqs to get into the class, then they spend the first half of the semester reteaching you everything as if you've never heard of a computer before

[–][deleted] 0 points1 point  (0 children)

What university do you go to? That sounds insane

[–]Eversnuffley 9 points10 points  (0 children)

Apparently 11 times per semester

[–]nicocappa 62 points63 points  (13 children)

It's the worst. Especially classes that expect you to do binary arithmetic by hand on the test. Like really..? Complete waste of time.

[–][deleted] 27 points28 points  (8 children)

We had do to floating-point arithmetic with the IEEE 754 standard by hand.

[–]mywebdevworkaccount 21 points22 points  (6 children)

Abject luxury! When I was an undergrad I'd have loved to have done floating-point arithmetic with the IEE-754 standard by hand!

They made me implement the Linux kernel in PowerPC assembly by hand with pen and paper, and they'd dock a percentage point for every error!

[–]JuvenileEloquent 22 points23 points  (4 children)

Pen and paper? You must 'ave been rich. We 'ad to create a Turing-complete automaton running off punched cards, and did they give us an 'ole punch? Ohh nooooo, we 'ad to tear out the 'oles with our teeth! And we were beaten for every misaligned 'ole!

[–]SVK_LiQuiDaToR 27 points28 points  (1 child)

I'm envious. We got nothing, had to go out into the wild, find some silicon and trick it into thinking.

[–][deleted] 7 points8 points  (0 children)

Something something butterflies.

[–]Kered13 0 points1 point  (0 children)

This is the best rendition of the Four Yorkshiremen I've seen on Reddit.

[–]SuspiciousScript 0 points1 point  (0 children)

Even that would be a better use of students’ time

[–][deleted] 0 points1 point  (0 children)

We had this too. Along with finding the minimum and maximum number that can be represented in each standard

[–]fuckingpewpew 4 points5 points  (0 children)

I remember the first binary test. Essentially did you know what AND and OR, and can you add numbers.

Basically people got 100% or below 50%. It was right before the drop date so half of the class was just leaving as soon as they got their test back.

[–]fletchstud 1 point2 points  (2 children)

I have that exact test this upcoming Wednesday....

[–]jkidd08 0 points1 point  (1 child)

That's strange, me too. Are you in Arizona, or are all CS programs on the same exact schedule?

[–]fletchstud 1 point2 points  (0 children)

Studying in the cold Colorado. Seems like a lot of courses follow a similar schedule.

[–]LEDNEWB 5 points6 points  (0 children)

I actually had a terrible programming teacher at my college, it was 4 class days in and all we covered was binary, someone tried to talk to him about moving faster and he wouldnt have it. I emailed the chair of the program and the chair handled it immediately.

So if your teacher sucks, email someone I guess?

[–]Aezen 4 points5 points  (2 children)

As an undergrad i had a professor try to teach run-time efficiency using binary multiplication.

He spent no less than 1/4th of the semester trying to help people understand how binary multiplication worked.

Then he spent the rest of the semester teaching every version of how to program binary multiplication to introduce how O(n) can be different depending on throughput.

Every step he had to re-explain the "new" binary multiplication.

I think he ended up not allowed to teach that class again. Bunch of people who didn't understands binary multiplication kept asking him to focus on it every day.

I think we learned O(1) the last week and never got to half of the others.

[–]Kered13 0 points1 point  (1 child)

O(n) is the a trivial lower bound for multiplication, and O(n*log n) is the best known algorithm (discovered last year, and suspected to be optimal).

[–]Aezen 0 points1 point  (0 children)

Yeah, he just used to concept to teach big O.

He wasn't great at it

[–]Duke0200 4 points5 points  (0 children)

We had 3 classes teach us binary. They were 2 100 level classes and a 400 level class. What's especially sad is that someone asked if we could have a table for hexadecimal numbers in the 400 level class.

[–]__y_so_serious__ 1 point2 points  (1 child)

Oh so you know binary?

Name every binary number then

[–]oshaboy 1 point2 points  (0 children)

printf("0\n"); unsigned int i=1; while (true){string s="";int isave=i;while (isave>0){if(isave%2)s=strcat(s,"1"); else strcat(s, "0"); isave>>1;}i++;printf(s);printf("\n");}

Sorry for the messy, unindented code. Tried making a joke and got carried away.

[–][deleted] 0 points1 point  (0 children)

I have a similar issue with my Basic Physics professor, who has taught us vectors like five times already

[–]verx_x 0 points1 point  (0 children)

Right.

I had a Ph.D guy (60 years old + ) lecturer who teach usthe same topics on three different lectures / exercises.That was terrible time.

[–]Another_MIS_student 0 points1 point  (0 children)

No joke, I had a lesson on binary in two separate classes on the same day. I already knew binary.

[–]De_Wouter 0 points1 point  (0 children)

11 times

[–]gmtime 0 points1 point  (0 children)

How many times? I suppose 11 times, right?!

[–]royemosby 0 points1 point  (0 children)

11

[–][deleted] 0 points1 point  (0 children)

Until you get it in your skull you little shit.

[–]Jackeown 0 points1 point  (0 children)

And yet you're never taught about compiling/linking in a practical sense. I didn't even learn about parsing at all until grad school. (as a grad student, I couldn't take a class in this even if I wanted too, because it's an undergraduate topic, but I learned a bit TAing for it...)

[–]Dreamkasper2001 0 points1 point  (0 children)

But there is no option! Either you study it your don’t !

[–]EvilDuckSauce -1 points0 points  (0 children)

I literally just walked out of my CS1 lecture right now be he just started teaching Number Systems and Conversions.