Minecraft Search

Saturday, 6 July 2013

Welcome to the Big Red Book of Redstone Standards!


* I'M BACK FOR 1.5 REDSTONE AWESOMENESS! *

Notice: UPDATING EVERYTHING

Activity: Low
After playing Tekkit (having been restricted to 1.2.5) and in combination with college, I have been gone for quite some time. Now I play Tekkit Lite with 1.4.7+ support giving me more updated vanilla knowledge. The new items in 1.5 make vanilla more of a tekkit feel. 

Please Read The Redstone Guide Before Reading This Thread

Please Read The Collection of Redstone Circuit Designs If Needing Basic Designs

Please only discuss the chapters or populated codes in this thread you are reading now.

Please take discussions of the actual IRPE format and standards here.
All discussions and debate regarding the format and standards within this thread (The Big Red Book of Redstone Standards) will be ignored.


(Thread, not just this post, under constant revision. Due to much being subject to change, there will be gaps intentionally left out and needing feedback and discussion.)


Welcome to the Big Red Book of Redstone Standards!


First, lets answer some questions...

What is the IRPE?
The IRPE is actually an acronym for Institute of Redstone and Piston Engineers or...
Spoiler: 
This is similar to the real-life IEEE, where all who actively contribute are part of it. Without standards, there would be no industrial revolution. No set drill-bit measurements, no set motherboard standards, just a jumbled mess of inventions.

Why was this created?
This is more or less an advanced guidebook and an index of possible creations. Details are given more in depth in relation to real-life standards with some creations having a possible schematic download. If one supports the IRPE coding, they can tag within their forum post what code it would fall under. So rather than re-posting a similar thread that already exists, search for the code or keywords here.

Do I have to use these?
Absolutely not, it only helps others understand what you've created because they will all be on the same level of understanding. Some redstoners are electrical engineers or computer technicians in real life, and all follow the same principles, standards, and etiquettes.

Do Mods Apply?
No, game mods are excluded, even if there are placeholders that are included in mods. The placeholders and reserved spots are actually meant for future versions of Minecraft or left up to the possible, logical, or both imaginative ways that it can be expanded of the current released version.

Please do not tag codes to mod-required creations as it may complicate things and create confusion.

What about Little Blocks Mod?
Yes and no. Due to it not modifying the original mechanics of Redstone it may be used. However, small to large connectivity cannot be used and will not be IRPE compliant. If an entire system is built using one size, it is compliant.

What about Eloraam's RedPower Mod?
Sadly, no, as many of the logic machines and blocks actually condense vanilla creations.


How do I start classifying?
At this point, I recommend reading the chapters...
Chapters:


Assuming you already read the guide to redstone, there is much more that may need explaining before diving in.

Computer Science

The study, implementation, and engineering of algorithms.

What is an algorithm?
A self terminating step-by-step process of manipulating input data and returning an output.

Why do I need to know this for redstone?
You don't...unless you're building operand CPU's.

What is an operand?
Scary stuff that live under your bed, so moving on...

How far can redstone simulate the real world of computers?
Assembly language interpreter would be the limit with a graphical display powered by a GPU. It would really be a working Intel 4004 with a 96x64 screen(2x2 pistons per pixel screen) and keyboard, but that's pushing it.

The massive redstone CPU's showcased are operand based with functions already programmed in the design itself. The player interface is usually bridged with predetermined op-codes and values.


Boolean
A Boolean is a single true or false value and used in the laws of logic.
True | False
+1   | -1
1       | 0
T       | FYes  | No
Y       | N+       | -
On   | Off

Information Storage - The Bit
A Bit is a single unit value of 1 or 0.

Does that make a Bit a Boolean value?
Yes.

Does that make a Boolean a Bit?
No.

Acronyms thrown around on these forums...
ALU  | Arithmetic Logic Unit
APU  | Accelerated Processing Unit
BCD  | Binary Compact Decimal Encoder
BCD7 | Binary Compact Decimal to 7-Segment Display Decoder
CPU  | Central Processing Unit
FPU  | Floating Point Unit
GPU  | Graphical Processing Unit
MUX  | Multiplexing and Organizer Unit
RAM  | Random Access Memory, Writable Access Memory, Volatile Memory
ROM  | Read Only Memory, Static Memory

TFF  | Toggled Flip-Flop
DFF  | Data Flip-Flip
JKFF | JK Flip-Flop
7DP  | 7 Segment Display with Decimal Point
7SD  | 7 Segment Display

Terms thrown around on these forums...
Core | A single ALU, CPU, or FPU, or APU

Circuitry In Real Life
Diode     | Allows electricity to only flow in ONE DIRECTIONCapacitor  | Storage of an electrical charge.
Transistor | Storage and conditional diode. (Commonly used as a Logical AND Gate)

Circuitry Components Relevance
REDSTONE | NEAR REAL LIFE EQUIVALENTRepeater | Diode with Capacitor
Wire     | Trace
Torch   | Vertical Light-Emitting-Diode (LED)
Lamp     | Spawn of Cthulhu and Destroyer of Servers
Piston   | Active Integrated Circuit Switch

Logical Components Definitions
Gate      | A logic function.
Latch    | A double or conditional gate.
Flip-Flop | A toggled gate or latch.

Logical Systems Definitions
Encoder | There are more INPUTS than OUTPUTS.
Decoder | There are more OUTPUTS than INPUTS.
Translator | There are arbitrary, equal, or patterned outputs to the inputs.


What is a "number system"?
It is a system of counting and storing numbers represented by visual characters and symbols. Counting from 1 to 9 is counting from "1" to "9" in the English language and Arabic-origin type set. You do not need to know logarithmic scales but you will need to know what a base number system is and the common ones used.

Descriptions:
Spoiler: 

Counting to 16 in each common number system...
Spoiler: 

Other Systems

Base 3 or "Ternary" can mean one of two distinct in concept but both the same in principle. Logic and counting are different, but it is still a number system using three values per digit. In logic it is either True, False, or Both/Unknown/Impossible. In counting it can be either {-1,0,+1} or {0,1,2, then 10, 11, 12}.

What does this have to do with Redstone?
When storing or simulating information, it is often necessary to convert binary to a different number system for a human to easily understand. This is done through a binary encoder built by raw circuitry and often leads to a common 7-segment display.

What is a 7-segment display?
A single digital display using 7 interconnected segments.
Posted Image

Logic is how you made the decision to read this post. Developing the consequences of wasting time in reading this sentence. Now take that to the smallest scale of Yes and No. Did you read it? Was it worth your time? Was it both? Was it neither? However, this is not a very good example for complex logic, only a simple way to get the gears turning.

What is a "gate"?
Lets say we have a light switch. When it's up or on, the light is on, when its down or off, the light is off. This is called a gate, it translated an input into an output upon itself no less because there is only one input. We can create a NOT gate by flipping the gate, where on is off, and off is on.

When there are two inputs, things get more complex from the two previous ways before. There are now 16 different gates that can be generated from two inputs of the two values being "on" and "off." For this, we need to start using binary and truth tables.

What is binary?
We humans count from 1 to 10, computers actually count from...0..to..1. While you might think this is very inefficient way of counting, it's actually the most efficient way of calculating. There are 10 types of people in the world, ones who understand binary, and ones who do not.

Don't computers count in bytes?
A byte is actually 8 bits, or 8 "Boolean" values of 1 and 0, that can either add up to 256 total possible values or be used as conditional switches.

So what's a "truth table?"
A truth table is quite simply that, a table of true and false statements upon the inputs provided. A simple 2 input, 1-bit per input truth table template looks like this:

Binary Index Set...
A B Q0 0 ?
0 1 ?
1 0 ?
1 1 ?
Boolean Truth Table...
..T F
T ? ?
F ? ?

You read it like...
Spoiler: 

MORE DETAILS:
Spoiler: 


So what's "Q"?
Q is a variable commonly described as an output, the origin is actually based on how we use the English alphabet as a tool itself. There are many variables used and some are function-defined. Listing them all is not needed normally as many deal with more complex constructs. However, from my own personal experience and from further research, the following shows what variables are commonly used for:
Spoiler: 

What happens if there's more than two inputs?
It becomes complicated. At this point information theory (and theorems) are sometimes applied as conditionals to handle such inputs. Meaning exclusions of gates needed to process a single logic function with N amount of inputs due to laws of logic. In programming it's byte-by-byte, using the least amount of space for a program to occupy on a storage device or memory. In a nutshell, it's using logic to DO logic while occupying the least amount or most efficient use of space. Perfect Example Here

Some points to remember for multiple-input truth tables:
Truth tables hate odd-length inputs it's just a fact of math...
Spoiler: 

How distribution is handled. It may be in a linear layer (most common) or a binary tree (most rare and used under certain conditions.) Linear is a straight-across gate system while a binary tree accumulates the inputs by splitting and processing them in pairs with the final 2 pair being the same as an A and B input gate. 

A logical system can be thought of a real-life Intergrated Circuit. Although we Minecrafters cannot make one, without mods at least, we can absolutely simulate one. This is why some jaw dropping redstone creations are so large, we don't have the means to miniaturize them.

What is a component and what is a system?
A component can be small, large, or a system itself. What makes a component a component is if it can be part of a larger system. For example, a piston by itself is a component, A digit on piston clock is a system of pistons, but a component itself because it can also be a single component of the digital clock. In over simplification... a component is a gear, a system is what makes it turn.

What defines a CPU?
A CPU, or central processing unit, is in a constant state of activity regardless if the user is doing nothing at all. It is always waiting for input and always in the state of output even in a Null state. It cycles itself to see if there is new data to process, in today's world the speed is actually dynamic.

What is Null?
Nothing, or better yet, the possibility of nothing becoming something, an imaginary nothing. It is not an "empty set", or "Ø", more of an in-between and in computing it is normally represented by 0 or -1.
-What's the difference? (Caution, may cause head to explode!)
Null has the possibility to become a value other than 0. "Empty set", or "Ø", means the value(s) do(es) not even exist and by the laws of mathematics that also means it is infinitely large and small of a value at the same time; meaning it has the potential to be 0 or infinite. Computers cannot simulate this, but they can imagine it, which normally ends up in a BSOD or an unhandled exception.

What is a Redstone CPU?
Now it gets more complex, and much, much, bigger. If you could simulate a real life CPU with over 2,000 transistors and its functions in redstone, that is the very essence of a Redstone CPU. The Logical Systems made in redstone are very simple CPU's, but very slow, and very, very, large.

How fast can they go?
Theoretically limited to 10 Hz, or 10 Cycles per second. However, this has nothing to do with the amount of instructions per second which makes them quite slower or perhaps faster depending how many "core's" are synced to cope with every new input.

What are half-adders and full-adders?
Think of addition and subtraction in the means of binary. Computers need help adding 1 + 1, seriously. A half adder will only return the single digit result, a full-adder will carry it over to the next register and that full-adder will take the last carry as input to process.

What's a register?
A memory unit in over simplification terms. It could store a single Boolean value or an entire byte or word.

What be these "words"?
Well, if you want the complete list of all data-types...
Spoiler: 
Anything that can be stored in a register can be considered a word.

What's an ALU?
An arithmetic logical unit, it's a system that does multiple functions in one. Think of it as a baby math coprocessor. It may be mostly comprised of half and full adders with an extension to Boolean functions.

What's a FPU?
A floating point (or precision) unit, it's a system that does heavy lifting of math. Think of one as part of a fighting duo next with the CPU, they both are incapable or crippled alone, but together, they are unstoppable. A common hand calculator consists of a CPU chip that has an FPU inside it. The CPU handles the inputs, the FPU crunches the math and throws it to the CPU, and the CPU spits it out in a nice clean manner for a human to read.

Doesn't this seem pointless in Minecraft for something to be so large?
For single-player survival, absolutely. But the mere fact it's an awesome logical teaching and creation tool makes it all the sweeter. In my youth (1998) we didn't have something like this, Lego Mindstorms was just coming out and before that we had to learn from programming in assembly code to have 2D tank robots to fight each other...good times. I would say, in my humble opinion, that Redstone is as good of a logic teaching tool than having to drag and drop or type out extremely short programming commands in sequence.[/size] 

No comments:

Post a Comment