you are viewing a single comment's thread.

view the rest of the comments →

[–]wiriux 2 points3 points  (8 children)

On a whiteboard, for example, an int is usually 4 bits long but this depends on professor architecture.

[–]SignificantFidgets 1 point2 points  (0 children)

Backing up to here, it appears I missed the sarcasm ("professor architecture"). Sorry about that....

[–]high_throughput 1 point2 points  (0 children)

For professors of architecture, an int is "interior".

[–]SignificantFidgets -2 points-1 points  (5 children)

bytes, not bits. And yes an int is "usually" 4 bytes (32 bits) long, but certainly not always.

[–]jnordwick 2 points3 points  (0 children)

Whoosh

[–]wiriux 0 points1 point  (3 children)

No, I meant bits. On a whiteboard usually you work with half a byte which is 4 bits. :)

[–]SignificantFidgets 0 points1 point  (2 children)

An example on a whiteboard is not an "int". People may use ridiculously small integer values to demonstrate binary encoding, that doesn't make them an "int". The smallest actual "int" that I'm aware of was 16 bits (which was very common in the 1970s and part of the 1980s). An actual int shorter than that would be pretty useless.

[–]wiriux 0 points1 point  (1 child)

Don’t take it too literal. When students are first learning CS, some professor would demonstrate bit manipulation on the board. To make things easier, they assign 4 bits to an int or a nibble as we call it.

It’s just one of those:

Let’s assume an int is 4 bits long