• NoFood4u
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    fuck it i’ll give it a try as a thought experiment.

    1. electricity:
    • wires are best made with copper, but most metals would be fine (do not touch connected wires, they’re not insulated).
    • for a generator just spin a magnet in a coil of wire.
    • the battery is the most difficult and dangerous part, using the generator you made, do a water electrolysis reaction (2 H2O -> 2 H2 + O2) by zapping a tiny amount of water and collecting the resulting invisible gas, the resulting mixture of gases is highly explosive so you can confirm whether the reaction is working by igniting a small amount. I think you can make chlorine by mixing bleach and vinegar. After mixing the chlorine with the hydrogen oxygen mixture you’ll be left with a mixture of hydrochlorine and oxygen (H2 + Cl2 -> 2 HCl), dissolve that in some water and you get hydrochloric acid. Finally put a plate of copper and a plate of zinc into the acid and you have a battery (i don’t remember for sure but i think the copper is the negative end)
    • now you just need something to demonstrate a use of electricity, a heater is just a coil of thick wire, a light bulb is just electricity run thru a titanium wire but some other metals that you can find might also work, to make an electromagnet run electricity thru a wire coiled around a piece of metal, the electromagnet can be used to make an electric motor.
    1. computers: i don’t know how to make an actual transistor but i know you can emulate one by inverting the inputs and outputs of an OR gate 1 means electricity flowing, 0 means electricity not flowing.
    • start with a transistor i’ll refer to it as an AND gate. A NOT gate will just output 1 when it’s input is 0 and output 0 if it’s input is 1.
    • basic gates: OR-just merge 2 wires into 1 wire with 3 ends, NAND-invert the output of an AND, NOR-invert the output of an OR, XOR-connect it’s inputs into an OR and a NAND which output into an AND which is the output of the XOR, XAND-invert the output of an XOR.
    • ALU (arithmetic logic unit): incrementation-flip the “1” bit and use ANDs and XORs to check whether you need to carryover to the next bit, decrementation-same thing as incrementation except you carryover when it’s 0 instead of when it’s 1, addition-add each pair of digits individually using ANDs and XORs then use more layers of ANDs and XORs to combine those outputs taking 1 bit as part of the result every layer until you have the full result, subtraction-invert the bits of one of the products of addition and increment the output.
    • memory: SR latch-two NORs on each one 1 input is of SR latch and the other is from the other NOR, the remaining output is one of the outputs of the SR latch, D latch-an SR latch that can only be affected when the “store” input is 1, the “data” input is connected to one of the inputs of the SR latch and invertedly connected to the other.
    • RAM (random access memory): a 2D array of memory cells made from D latches that takes an address as input for read or write operations.
    • CPU (central processing unit): interprets instructions in the form of a string of 1s and 0s here’s an example ISA (instruction set architecture) that i wrote that uses 16-bits per instruction: 10-ww-xxxx-yyyy-zzzz - logical test writes 1 to xxxx if the logical test is true and writes 0 otherwise ww: 00 => yyyy != zzzz 11 => yyyy == zzzz 01 => yyyy > zzzz 10 => yyyy >= zzzz 01-ww-xxxx-yyyy-zzzz - math operation performs a math operation on the numbers from the registries yyyy and zzzz, writes the result to the xxxx registry ww: 00 => yyyy - zzzz 11 => yyyy + zzzz 01 => yyyy++ 10 => yyyy– 0000-xxxx-yyyyyyyy - write to registry write the bits yyyyyyyy to the xxxx registry 11000001-x-yyyyYY - jump back if x is 0 it jumps by yyyyyy instructions, if x is 1 it jumps by the number of instructions in the yyyy registry (last two YY is ignored) keep in mind that there are 64 instructions in total and they rollover so jumping 64 instructions won’t do anything and jumping 63 instructions will jump forward by one 11000011-x-yyyy - print to console prints the number in the yyyy registry if x is 0, displays its letter representation if x is 1 11000000-xxxx - input writes the input number into the xxxx registry

    registries here are just memory cells that can store 8 bits, it supports code up to 64 instructions and also has some instructions for I/O (input/output) devices use a clock to modulate the speed at which the CPU reads instructions, use the ALU from earlier to do the math, some messing around with logic gates should let you do everything else. With a more advanced CPU and a display of some kind you might be able to talk jesus into playing Doom!

    1. math:
    • trigonometry and the pythagorean theorem have been known to be used since ancient egypt so don’t bother with that.
    • calculus: derivatives (represents the rate of change or infinitesimally small change in output divided by its corresponding change in input) - d/dx(a + b) = a + b , d/dx(a * b) = a * b + b * a , d/dx(an) = n*an-1 , d/dx(f(g(a))) = f(g(a)) + g(a). I’m not good with integrals but they represent the area between a graph and the x axis in certain bounds. e =approximately 2.7 .
    • complex numbers: i2 = -1 , eix = cos(x) + i*sin(x)
    • quaternions: i2 = j2 = k2 = i * j * k = -1 , the complex part defines a vector and the real part defines a rotation around that vector.
    • hyperbolic trigonometry: sinh(x) = (ex-e-x)/2 , cosh(x) = (ex+e-x)/2

    this is as much as i think i could reinvent, props to anyone who actually read this far

    also i should probably mention not to try that battery recepie or you will die.