fg lore
minecraft
memes
math
random
200

who is married to god

bryan

200

step 2 of building a redstone computer (cite word for word)

PENTUPLE POINTS



The ALU we will be building can perform four important operations on two inputs and return a correct output. A, B, being both 8-bit inputs

  • A + B (Add A to B)
  • A >> (bitshift A right (the same as binary divide by 2))
  • << A (bitshift A left (the same as binary multiply by 2))
  • NOT A (The opposite of A)

There can also be multiple ALUs inside a computer, as some programs require a lot of operations to run, which do not depend on the previous operations (so they can be threaded) so delegating them to different ALUs could significantly speed up the program.


binary adder

Adding two numbers


Example: do 10 subtract 9

1. 0000 1001(9 in binary, we want -9, not 9)2. 1111 0110(Invert 9, so that all 0s are 1s and 1s are 0s)3. 1111 0111add one (this the two's complement of 9)4.0000 1010(10 in binary)+1111 0111add two's complement of 9 (aka -9)----0000 0001result (10 + (-9) = 1) (there is an overflow, this just means that the result is not a negative number)

This poses the complexity of signed numbers.[1] This is a weight to the binary number to assign it as a positive or negative number. Whether the result is a negative or positive number is determined by the overflow flag. If there is an overflow, this means that the number is positive and otherwise, negative.

To implement this, you can ask the ALU to do 3 operations. To do A subtract B, the operations are

Operation: A SUB B

  • NOT B
  • (set B to) B ADD 1
  • (set A to) A ADD B
  • RETURN A

Multiplying two numbers

Multiplication is repeated addition, so the easiest (inefficiently) is to add A to a variable B amount of times.

Here's pseudomachine code for it

Operation: A * B

  • C = 0
  • (set C to) C ADD A
  • (set B to) B SUB 1
  • JUMP IF (B > 0) TO LINE 2
  • RETURN C

However, there are more efficient ways of multiplication. A good method is to repeatedly bitshift the first number to the location of each 1 in the second number and sum it.

There are underscores to mark indents, since padding with 0s are less intuitive. subscript 2 means in binary, and decimal numbers are also in bold

__ __113 (notice that there are 2 1s)x_ 101111----__ __11We shift 112 by 010 since the 1st bit of 10112 is 12+_ _110We shift 112 by 110 since the 2nd bit of 10112 is a 12+1 1000We shift 112 by 310 since the 4th bit of 10112 is a 12----the 3rd bit of 10112 is 02 so we do not add a 112 there10 000133 (result)

so this is more efficient for larger numbers.

Operation: A * B

  • C = 0
  • D = 0
  • (Set A to) << A (bitshift A to the left)
  • JUMP IF (BIT (D) OF B == 0) TO LINE 6
  • (Set C to) C ADD A
  • (Set D to) D ADD 1
  • JUMP IF (D < LENGTH OF B) TO LINE 3
  • RETURN C

Don't forget that

<< A (bitshift to the left) is effectively, A * 2

and

>> A (bitshift to the right) is effectively, A / 2

If the numbers are predictable or the CPU must do a lot of similar numbers in bulk, consider using a look-up table to quickly get results to frequently called multiplication. Is this a way of hard-coding your answers and is used in extreme cases.

Step 2: Building an Arithmetic Logic Unit (PRACTICE)


Step 3: Instruction set and machine architecture (THEORY)

This is pretty fun, this part.

Elaborating on Chapter 2: Instruction Set, we will be creating one for ours.

For the MASIC Computer, the computer which we are building, has an 8-bit system, so that means each instruction on each slot of the stack memory will be 8 bits. The stack memory is the memory where any information can be stored and is on the RAM. There will be a counter, called the program counter, which increments by 1 every cycle. A cycle is the CPU fetching the instruction, decoding the instruction (finding out what to do with the instruction) and executing the instruction (doing what it tells it to do). Then it moves on to the next one by incrementing the program counter and reading the information at that location in the stack memory.

So each byte in the stack memory has 8 bits for us to work with.

0000 0000



200

what did the despicable me girl say after bowser farted and spanked himself

are you single

200

if jerry has 10 skibidis, but he eats 9, how many does he have left

one

200

avg penile length in italy

6 inches

400

who rules the misspall kingdum

grayson jr

400
who is l minecraft player

any acceptable answer by the judge

400

theres _ _ _ _  (fill the blanks)

nothing we can do

400

a legion of 3553 skibidis raid the tv base, but 21042 are taken out, how many are left

-17489

400

does anthony have skibidi rizz

no

600

who was the first person to die

olen

600
can u break bedroc

yuh

600

is skibidi toilet funny (real)

no

600

c=5/9 f−5/9(32)

i dont know

600

how tall is judge

9 foot (5"3')

800

who is stronger than grayson sr

gunnar (he is rare)

800

What was Minecraft almost called

Cave Game

800

what meme died last year 

acceptable by judge

800

x = x+1 (find x)

its impossible!!@ ithink


800
are you mewing

about 300

1000

where was the first murder

duogh-bakeing (poisoned breast)

1000

how tall would minecraft chickens be in real life

3ft

1000

how long was the first skibidi toilet video

11 seconds

1000

10 people are at an anime convention, 2 come out alive, how many people did goku fight

0, goku is chill like that

1000

how many people practice incest (estimate)

11,340,000

M
e
n
u