Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Computerphile

Author
Message
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Aug 2013 22:22 Edited at: 28th Aug 2013 22:24
Anyone else watch this youtube channel? I just caught this video:


That got me thinking about how you could automate card sorting, for when they inevitably got mixed up. Assuming cards are fed into one side and spat out the other, all cards are numbered in a way that can be read by the sorting machine, and the sorting machine can store three numbers in memory at a time:

Variables
n# is the ID number of the current card
hi# is the highest ID number read so far
lo# is the lowest ID number read so far

Pseudo Commands
LOAD loads the next card.
READ [var] reads the currently loaded card number into a variable.
SPIT ejects the currently loaded card.
BEEP [n] computer emits an audible noise n times, or once if there is no n.
HALT suspends the program until the operator presses a key.
GOTO [n] moves to line n.
FAIL tells the program what to do if the previous command fails.

Manual
Beeps are used to instruct the operator:
* One beep indicates that the next card is destined for the bottom of the output pile. The operator should remove the pile and replace it once the next card has been ejected.
* Two beeps indicate that the next card is destined for the position immediately below the top card. The operator should remove the top card and replace it once the next card has been ejected.
* Three beeps indicate that the loading bay is empty. The operator should take the entire output pile and put it back in the loading bay.
* When any number of beeps are sounded, the operator must prepare the output pile as required and press a key to continue the program.

Program
00 hi# = 0; lo# = 0;
01 LOAD; FAIL → BEEP 3 → HALT → GOTO 06;
02 READ n#;
03 if n# > hi# → hi# = n# → SPIT → GOTO 01;
04 if n# < lo# → lo# = n# → BEEP → HALT → SPIT → GOTO 01;
05 BEEP 2 → HALT → SPIT → GOTO 01;
// This half is reversed because the card order has been reversed
// so it means more cards can simply be spat out, making the process faster.
06 hi# = 0; lo# = 0;
07 LOAD; FAIL → BEEP 3 → HALT → GOTO 00;
08 READ n#;
09 if n# > hi# → hi# = n# → BEEP → HALT → SPIT → GOTO 07;
10 if n# < lo# → lo# = n# → SPIT → GOTO 07;
11 BEEP 2 → HALT → SPIT → GOTO 07;



Formerly OBese87.
Dark Java Dude 64
Community Leader
14
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 29th Aug 2013 00:37
Ahhh!!! I'll be checking them out for sure. I have been a long time watcher of numberphile's videos, but I had no idea they had a computer channel too. Neato!
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 29th Aug 2013 00:39


Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 29th Aug 2013 02:33 Edited at: 29th Aug 2013 03:08
I liked this introduction of entropy and compression.



Sorry to for diverting the primary subject however.

I also liked this one, up until the 50th second I was impressed, then came the disappointment.... Oh brother,.. that was so unremarkable that bit, but everthing else about the nostalgia contraption was pretty hip.



I do not know why, but ghetto hardware tactics like that just makes me laugh, at least lose the Dell case and make it look like it is not just a PC connected to a monitor.

bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 30th Aug 2013 03:16
Quote: "That got me thinking"


Wow, you reinvented something that had already been invented before most people on the planet were born lol.

http://en.wikipedia.org/wiki/IBM_card_sorter

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Sep 2013 00:53
Interesting video.

Reminds me of my student days - and a painful reminder of my son's early years. I'd kept the punched cards from my MSc project in the hope that one day I'd revisit the data and analyse it properly. There were several hundred cards in total, each representing about 72-80 characters of data. For several years the cards were safe inside a cupboard at home and held together with an elastic band. Then one day my toddler son found them while I was working outside in the garden. He then took them outside - minus the band of course - and played with them. Unfortunately I didn't realise what he'd done till after the next heavy shower of rain ... Sorting was the least of my problems.

Actually he probably did me a service - he spared me the inevitable decision of disposing of them myself. But I didn't quite see it that way at the time.

Ah! Those were the days ...



Powered by Free Banners
The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 8th Sep 2013 16:35
Quote: "Wow, you reinvented something that had already been invented before most people on the planet were born lol.

http://en.wikipedia.org/wiki/IBM_card_sorter"


I think the Germans used a variant of this during WW2 to process the Jews in concentration camps?

Login to post a reply

Server time is: 2025-05-14 22:53:17
Your offset time is: 2025-05-14 22:53:17