Relay computer calculates 7 digits of Pi

  Рет қаралды 86,653

Pavel Dovgalyuk

Pavel Dovgalyuk

Күн бұрын

Calculation of Pi approximation by dividing 355 to 113.
Program outputs digits (one by one) of the result into the register S, which can be observed by the user.
Executed program listing:
; var a
MOVI A, 1 ; 00: 10000000 00000001
MOVI B, 99 ; 01: 10000001 01100011
; var b
MOVI M, 113 ; 02: 10000100 01110001
Main:
Div:
MOVI L, 0 ; 03: 10000110 00000000
Loop:
SUB D, B, M ; 04: 01011011 00011100
SBC C, A, 0 ; 05: 01010010 10001000
JMP C, Exit ; 06: 10110111 00001011
ADD L, L, 1 ; 07: 01001110 11101001
MOV B, D ; 08: 00011001 00110000
MOV A, C ; 09: 00011000 00100000
JMP Loop ; 0a: 10000111 00000100
Exit:
; Display next digit in S
MOV S, L ; 0b: 00011101 01100000
; rem * 2 still less than 256
ADD D, B, B ; 0c: 01001011 00011001
; rem * 4
ADD B, D, D ; 0d: 01001001 00111011
ADC A, A, A ; 0e: 01000000 00001000
; rem * 8
ADD B, B, B ; 0f: 01001001 00011001
ADC A, A, A ; 10: 01000000 00001000
; rem * 10
ADD B, B, D ; 11: 01001001 00011011
ADC A, A, 0 ; 12: 01000000 10001000
JMP Main ; 13: 10000111 00000011
Project page on github: github.com/Dov...

Пікірлер
@Pavel.Dovgalyuk
@Pavel.Dovgalyuk Жыл бұрын
Here is another video with the same algorithm, but with teletype output: kzbin.info/www/bejne/fqKwl417hdB6h6c
@quistan2
@quistan2 3 жыл бұрын
I didn't know the sound of Pi was so intense, it has its own chase music.
@r.d.machinery3749
@r.d.machinery3749 3 жыл бұрын
That machine is just beautiful. I have watched the video of it running a dozen times and it still mesmerizes each time.
@antonnym214
@antonnym214 4 жыл бұрын
This is amazing! I used to program in Z-80 and 8080 Assembly, and your source code is similar. I will visit your project for more details, because I'm interested in the architecture. I have subscribed and thumbs-up! P.S. This would look great with a flipdot display!
@FennecTECH
@FennecTECH 5 жыл бұрын
What a beautiful peace of equipment. Such an bruitforce combination of electrical and mechanical beauty.
@randallbanning
@randallbanning Жыл бұрын
Used to program the 6502 then the 65C02 using the compiler Merlin. I could spend hours buried in assembly language routines, debugging and optimizing just to shave off a few microseconds. Loved it!
@martinswan9175
@martinswan9175 2 жыл бұрын
Your computer has me ready to break out some drums. 😄
@b43xoit
@b43xoit Жыл бұрын
Magnetic drum storage?
@iblesbosuok
@iblesbosuok Жыл бұрын
Shifting and substracting. This must be result of tens of years effort. Respect.
@sergatmel8242
@sergatmel8242 5 жыл бұрын
Звуки реле и перемигивание светодиодов просто завораживают. 👍
@st.charlesstreet9876
@st.charlesstreet9876 2 жыл бұрын
Obviously this machine was properly “Debugged “ 😂 Love this demonstration of the electromechanical devices. 🎉
@b43xoit
@b43xoit Жыл бұрын
No doubt each relay comes in its own plastic enclosure.
@SteelHorseRider74
@SteelHorseRider74 2 жыл бұрын
this sound definitely has loop-potential ^_^
@andrerenault
@andrerenault Жыл бұрын
It’s in 5/4 in case anybody’s wondering
@EngineerNotFound
@EngineerNotFound Ай бұрын
It sounds like a train, a very rhythmic one. The mind boggles at how the calculation is even done, using relays. Beautiful machine...
@blendpinexus1416
@blendpinexus1416 2 жыл бұрын
ok, i want to watch this when you've turned the speed up to as fast as it can do and still be stable
@tvitaly1
@tvitaly1 2 жыл бұрын
it's amazing to see this in the 21st century!
@icarusDaBoi
@icarusDaBoi Жыл бұрын
3/4 2/4 2/4 3/4 3/4 3/4 2/4 3/4, and so on. This computer loves playing with time signatures
@b43xoit
@b43xoit Жыл бұрын
Maybe he has it wired to cut execution short for instructions that don't need all the time steps possible.
@EngineerNotFound
@EngineerNotFound Ай бұрын
I recon there is even 5/4 in there; if you hum Dave Brubeck's 'Take Five' over it, It definitely fits.. Or is it just 3/4 + 2/4 ???
@lnteIIigence
@lnteIIigence Жыл бұрын
I'm glad it was able to do that otherwise we may never have known the answer.
@jimtekkit
@jimtekkit Жыл бұрын
Really cool machine and it's interesting to see the output in binary.
@Minecraft-3699
@Minecraft-3699 Жыл бұрын
thanks for *relaying* this information
@brianshoubert7803
@brianshoubert7803 Жыл бұрын
Прикольная цветомузыка у вас )))
@thenextwindow
@thenextwindow 4 жыл бұрын
This is my favorite Steve Reich song
@okboing
@okboing 3 жыл бұрын
This is like a primitive maraca that beat and that's why I like relays more than transistors now
@ideegeniali
@ideegeniali Жыл бұрын
This computer may lack a GPU but definetively has sound capabilities
@cetocoquinto4704
@cetocoquinto4704 Жыл бұрын
Ahhh back in the time where computers are our slaves..now its in reverse hahaha
@stavinaircaeruleum2275
@stavinaircaeruleum2275 Жыл бұрын
Man that computer's laying down some epic beats bro
@Johny570
@Johny570 Жыл бұрын
Скачал себе на флешку, в машине буду слушать :)
@steelyspielbergo
@steelyspielbergo Жыл бұрын
My grandfather had an old John Deere tractor that sounded like this.
@Bart_LP
@Bart_LP 2 жыл бұрын
This is how computers in german federal offices sound.
@mikip3242
@mikip3242 Жыл бұрын
As a tap dancer, I feel you bro
@bob4analog
@bob4analog 4 жыл бұрын
Is the rhythm of this considered the clock frequency?
@Pavel.Dovgalyuk
@Pavel.Dovgalyuk 4 жыл бұрын
That's right.
@Humble_Electronic_Musician
@Humble_Electronic_Musician 2 жыл бұрын
I hear music 🎶 Nice rhythm ! And awesome PC (personal computer)
@randomexcessmemories4452
@randomexcessmemories4452 Жыл бұрын
If I can manage it, I would love to teach myself how to make something like this. Incredible!
@clarkinthedark1
@clarkinthedark1 Жыл бұрын
same!
@zidane2k1
@zidane2k1 Жыл бұрын
To think that today, the phone in our hands can do this same calculation trillions of times in the time it took this antique relay computer to do it once.
@ursibar7837
@ursibar7837 2 жыл бұрын
We neee the 10hr version for sleep!
@CrimsonSteelMoonTheWolf64
@CrimsonSteelMoonTheWolf64 Жыл бұрын
Something mesmerizing about hearing the computer crunch the numbers via its relay system.
@K-Effect
@K-Effect 2 жыл бұрын
I’d like that beat
@suspense_comix3237
@suspense_comix3237 2 жыл бұрын
Would I recommend using this computer? No. It’s slow. Would I recommend using this computer for calculations in the exam hall and to make music? Absolutely.
@MisterTrayser
@MisterTrayser 4 жыл бұрын
It's actually a beat with light music
@yeong126
@yeong126 Жыл бұрын
What a soothing sound of relays
@gauribadukale2397
@gauribadukale2397 Жыл бұрын
It sounds sooo satisfying 😍
@andrewkinsey8754
@andrewkinsey8754 Жыл бұрын
KZbin, why do you put such temptation in front of me? This is dork heroin right here
@Lam-s-Workshop
@Lam-s-Workshop Жыл бұрын
What beautiful Melody
@Xiefux
@Xiefux Жыл бұрын
just shows how fast modern computers are. on my ryzen 9 3900x it takes only 90 seconds to calculate 1 billion digits of pi. by the time this calculator finishes doing 8 digits i can do over 5 billion
@ibrozdemir
@ibrozdemir Жыл бұрын
dancing in middle of my room in a very weird fashion
@ahbushnell1
@ahbushnell1 2 жыл бұрын
1e-6 MIPS
@szaracenzsakos6952
@szaracenzsakos6952 5 жыл бұрын
This sound like is fast steam engine.
@TexasRailfan2008
@TexasRailfan2008 4 жыл бұрын
Szaracén Zsákos yeah it kinda does
@ijunkie
@ijunkie 2 жыл бұрын
And this is why the mechanical computer era never lasted more than a few years.
@jannejohansson3383
@jannejohansson3383 2 жыл бұрын
It was needed.
@PRH123
@PRH123 Жыл бұрын
Mechanical computers were used on navy ships for more than 50 years…. mechanical calculators were used for 100 years….
@ijunkie
@ijunkie Жыл бұрын
@@PRH123 In specific applications, analog computers are useful, yes.
@JoelLessing
@JoelLessing Жыл бұрын
@@ijunkie This is digital, not analog. It’s just slow, that’s all.
@Logic44
@Logic44 Жыл бұрын
Out of all the sounds I expected, none of them were "Steam locomotive" lmao
@SirSoup420
@SirSoup420 5 жыл бұрын
What is the name of the algorithm you used?
@Pavel.Dovgalyuk
@Pavel.Dovgalyuk 5 жыл бұрын
This is a digit-by-digit calculation of a fraction 355/113
@bbqgiraffe3766
@bbqgiraffe3766 2 жыл бұрын
Huh interesting choice to display the LSB on the right instead of the left
@Civsuccess2
@Civsuccess2 Жыл бұрын
Can't believe how slow it can be. Had to wait minutes for a digit to pop out.
@Dont_Gnaw_on_the_Kitty_1
@Dont_Gnaw_on_the_Kitty_1 2 жыл бұрын
That's not a computer, it's a drum machine.
@twogitsinacar4811
@twogitsinacar4811 5 жыл бұрын
Fantastic
@TymexComputing
@TymexComputing Жыл бұрын
oh, its dividing the hierarchical fraction approximation - still very nice rythm :)
@CT--od7ux
@CT--od7ux 4 жыл бұрын
that's a good song
@joujimiumiu
@joujimiumiu 5 жыл бұрын
Incredible !!
@roberto4898
@roberto4898 Жыл бұрын
The devil is moving those relays 😂.
@JoshuaF.
@JoshuaF. 9 ай бұрын
i am a simple man i see relay, i like i see pi, i like
@ursibar7837
@ursibar7837 2 жыл бұрын
Stand up for the computer anthem!
@muffinstuff6195
@muffinstuff6195 Жыл бұрын
POV: Hans Zimmer composing the dark knight score
@dev5576
@dev5576 Жыл бұрын
i was really hoping for some bass to kick in
@satanbane
@satanbane Жыл бұрын
It might be nice to have it make a sound every time it computes a new digit; may I suggest, the sound of a steam train whistle.
@BlackEpyon
@BlackEpyon Жыл бұрын
Did you put LEDs inside the relay modules? That is so cool! I love blinkenlights!
@Pavel.Dovgalyuk
@Pavel.Dovgalyuk Жыл бұрын
There are relay modules with embedded LEDs.
@BlackEpyon
@BlackEpyon Жыл бұрын
@@Pavel.Dovgalyuk I didn't know they came with LEDs.
@pgfinna
@pgfinna 4 жыл бұрын
Sounds like a Steve Reich song
@luiscosta4945
@luiscosta4945 Жыл бұрын
Is this a rhytm machine? Nice Grooooooove!
@choppergirl
@choppergirl Ай бұрын
Nice beat... easy to dance to... I give it a 4 out of 5 stars Seems to take up a lot of space. And I wouldn't want tho to wait on it and listen to it... all day long Is there any way you could make it faster and quieter and like shrink it down some?
@sophiacristina
@sophiacristina 2 жыл бұрын
I also like Minimal Techno...
@alissoncandatem1896
@alissoncandatem1896 Жыл бұрын
Ok this a really weird Javascript Library i'm gonna head out
@ml.2770
@ml.2770 2 жыл бұрын
Move aside pencil and paper. We've got time and kW to burn!
@RideiKarim-w8g
@RideiKarim-w8g 2 ай бұрын
the quality of the relay must be very good :-)
@koppadasao
@koppadasao Жыл бұрын
Sounds musical...
@normannormiemates4844
@normannormiemates4844 5 жыл бұрын
music!
@soteful9949
@soteful9949 2 жыл бұрын
cool beat, when is the guitar solo?
@pauliedweasel
@pauliedweasel Жыл бұрын
It’s got a beat you can dance to!
@mdh_1984
@mdh_1984 2 жыл бұрын
Мощьно
@ihavetwofaces
@ihavetwofaces Жыл бұрын
Oh, man. My mom loved Lord of the Dance, lol.
@TheMiniatureRobot
@TheMiniatureRobot Жыл бұрын
Incredible! But can it run doom? Crysis?
@Amberstargazerofearth
@Amberstargazerofearth 2 жыл бұрын
Очень впечатляет! Однако, или реле старой конструкции, или их тысячи одновременно в работе?
@Pavel.Dovgalyuk
@Pavel.Dovgalyuk 2 жыл бұрын
Ну их не тысячи, а две-три сотни. Но это не герконовые реле, конечно.
@oiytd5wugho
@oiytd5wugho Жыл бұрын
Is this the whole "math rock" thing they were talking about?
@Locksharpe
@Locksharpe Жыл бұрын
5:55 is it coming down with the sickness?
@bobhowe5919
@bobhowe5919 Жыл бұрын
Somebody needs to duet this.
@aternias
@aternias Жыл бұрын
About 10 Hz clock signal
@KevinEontrainer381
@KevinEontrainer381 Жыл бұрын
I was waiting for the base to drop...
@matthewhuddleston9052
@matthewhuddleston9052 3 ай бұрын
Any relation to Steve Reich or the Marble machine?
@Pavel.Dovgalyuk
@Pavel.Dovgalyuk 3 ай бұрын
No, I haven't seen it.
@neriozulberti1492
@neriozulberti1492 Жыл бұрын
Alan Turing is smiling 😊
@putrescentvermin
@putrescentvermin Жыл бұрын
I feel like someone could rap over this.
@liljames2k
@liljames2k 5 жыл бұрын
Why it calculates the wrong Number at the end?
@Pavel.Dovgalyuk
@Pavel.Dovgalyuk 5 жыл бұрын
Because it calculates a fraction, which is only the approximation of Pi.
@Gazdatronik
@Gazdatronik Жыл бұрын
@@Pavel.Dovgalyuk ok. but why was it doing well until that point? not enough registers for that many decimal places? Its giving me much more appreciation for the eggheads who figured this out on paper hundreds of years ago.
@Pavel.Dovgalyuk
@Pavel.Dovgalyuk Жыл бұрын
@@Gazdatronik I don't know who and how found this approximation.
@emmata98
@emmata98 Жыл бұрын
​​@@Gazdatronik the first recorded methods were with regular n-gons. But the info is rare. Edit: the fraction is just that off. Like 3 is just 0.33333... off of 10/3.
@n10cities
@n10cities Жыл бұрын
Cool! But can it play Crysis? (I know..... tired old meme, but couldn't resist) ;) Have never seen one of these before.
@ralfrosenberger666
@ralfrosenberger666 Жыл бұрын
How long does it take to render a 4k-Video 😉
@Mark_Ocain
@Mark_Ocain 4 ай бұрын
cool!
@jptrainor
@jptrainor Жыл бұрын
It needs a base line and a melody.
@archivushka
@archivushka Жыл бұрын
I'm gonna ask the age old question: Will it run doom?
@WigWagWorkshop
@WigWagWorkshop Жыл бұрын
Intro to Mr Brownstone by Guns n Roses
@my_unreasonably_long_username
@my_unreasonably_long_username Жыл бұрын
what is the size of the power supply on this thing?
@Pavel.Dovgalyuk
@Pavel.Dovgalyuk Жыл бұрын
There is a big rectangular module in the bottom of every unit of the computer.
@Nickfisch1
@Nickfisch1 Жыл бұрын
Music when?
@olavschioett4101
@olavschioett4101 Жыл бұрын
Man that is soo cool❤️
@VR_SHOW
@VR_SHOW Жыл бұрын
That sound ❤️ (like train)
@MrPickle21100
@MrPickle21100 Жыл бұрын
You forgot to carry the click clack
@blanana_m
@blanana_m Жыл бұрын
Somebody make a song outta this
@jareknowak8712
@jareknowak8712 Жыл бұрын
Will it run crysis?
@railgap
@railgap Жыл бұрын
Has anyone set this to music?
I spent all summer building THIS! (relay computer)
22:34
WillsBuilds
Рет қаралды 53 М.
I Made a 32-bit Computer Inside Terraria
15:26
From Scratch
Рет қаралды 4,3 МЛН
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
1958 FACOM 128B Japanese Relay Computer, still working!
24:05
CuriousMarc
Рет қаралды 1,4 МЛН
The Fastest Maze-Solving Competition On Earth
25:22
Veritasium
Рет қаралды 21 МЛН
The 7 Levels of Math Symbols
14:03
The Unqualified Tutor
Рет қаралды 61 М.
Jailbreaking a Prison Laptop to Play Prison Games
24:09
Bringus Studios
Рет қаралды 1,2 МЛН
This Amazing 70 Year Old Calculating Machine
12:06
Janus Cycle
Рет қаралды 159 М.
Light Years Ahead | The 1969 Apollo Guidance Computer
1:21:22
TNMoC
Рет қаралды 2,5 МЛН
Soyuz "Globus" Mechanical Navigation Computer Part 1: Grand Opening
23:02
1920 Comptometer Mechanical Calculator
18:48
Tech Tangents
Рет қаралды 82 М.
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН