Ternary Spacecraft Board for Maker Faire Roma 2018 Giuseppe Talarico 1/15

Similar documents
LAB #1 BASIC DIGITAL CIRCUIT

Logic Gates and Boolean Algebra ENT263

(Refer Slide Time 3:31)

Combinational Circuits

COMBINATIONAL LOGIC CIRCUITS

(Refer Slide Time 6:48)

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

1. Mark the correct statement(s)

Chapter 4. Combinational Logic

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR

Digital Circuits 1: Binary, Boolean, and Logic

Combinational Circuits

Logic, Words, and Integers

Midterm Exam Review. CS 2420 :: Fall 2016 Molly O'Neil

1. Draw general diagram of computer showing different logical components (3)

MODULE 5 - COMBINATIONAL LOGIC

Chapter 2: Combinational Systems

Bits, Words, and Integers

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Department of Electrical Engineering McGill University ECSE 221 Introduction to Computer Engineering Assignment 2 Combinational Logic

COMP combinational logic 1 Jan. 18, 2016

END-TERM EXAMINATION

Injntu.com Injntu.com Injntu.com R16

UNCA CSCI 255 Exam 1 Spring February, This is a closed book and closed notes exam. It is to be turned in by 1:45 PM.

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

Computer Organization and Levels of Abstraction

LECTURE 4. Logic Design

Introduction to Boolean logic and Logical Gates

Digital Logic Design Exercises. Assignment 1

Primitive Computer Functions

Combinational Logic. Prof. Wangrok Oh. Dept. of Information Communications Eng. Chungnam National University. Prof. Wangrok Oh(CNU) 1 / 93

Digital Systems. John SUM Institute of Technology Management National Chung Hsing University Taichung, ROC. December 6, 2012

COMPUTER SIMULATION OF COMPLEX SYSTEMS USING AUTOMATA NETWORKS K. Ming Leung

R07

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

Boolean Algebra and Logic Gates

Propositional Calculus. Math Foundations of Computer Science

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

Gate Level Minimization Map Method

Designing Information Devices and Systems II Spring 2018 J. Roychowdhury and M. Maharbiz Discussion 1A

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

Scheme G. Sample Test Paper-I

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

Designing Information Devices and Systems II Fall 2017 Miki Lustig and Michel Maharbiz Discussion 1B

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

DE Solution Set QP Code : 00904

Computer Organization and Levels of Abstraction

Chapter 2 Basic Logic Circuits and VHDL Description

Binary Adders: Half Adders and Full Adders

Software and Hardware

Objectives: 1. Design procedure. 2. Fundamental circuits. 1. Design procedure

Combinational Logic II

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

BOOLEAN ALGEBRA. Logic circuit: 1. From logic circuit to Boolean expression. Derive the Boolean expression for the following circuits.

Chapter Three. Digital Components

Chapter 2 Boolean algebra and Logic Gates

Mark Redekopp, All rights reserved. EE 352 Unit 8. HW Constructs

Chapter 2: Universal Building Blocks. CS105: Great Insights in Computer Science

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

2008 The McGraw-Hill Companies, Inc. All rights reserved.

QUESTION BANK FOR TEST

IT 201 Digital System Design Module II Notes

Basic Arithmetic (adding and subtracting)

Boolean Algebra. BME208 Logic Circuits Yalçın İŞLER

Chapter 3. Boolean Algebra and Digital Logic

BOOLEAN ALGEBRA AND CIRCUITS

REGISTER TRANSFER AND MICROOPERATIONS

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

Combinational Logic with MSI and LSI

2. BOOLEAN ALGEBRA 2.1 INTRODUCTION

EE292: Fundamentals of ECE


Topics. Computer Organization CS Exam 2 Review. Infix Notation. Reverse Polish Notation (RPN)

Boolean Algebra & Digital Logic

Course Batch Semester Subject Code Subject Name. B.E-Marine Engineering B.E- ME-16 III UBEE307 Integrated Circuits

DeMorgan's Theorem. George Self. 1 Introduction

Introduction to Boole algebra. Binary algebra

CSE303 Logic Design II Laboratory 01

Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

(Refer Slide Time: 00:01:53)

Lecture #21 March 31, 2004 Introduction to Gates and Circuits

GC03 Boolean Algebra

Experimental Methods I

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

CS40-S13: Functional Completeness

Written exam for IE1204/5 Digital Design Thursday 29/

Simplification of Boolean Functions

Summary of Course Coverage

Combinational Circuits Digital Logic (Materials taken primarily from:

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS

Read this before starting!

Combinational and sequential circuits (learned in Chapters 1 and 2) can be used to create simple digital systems.

that system. weighted value associated with it. numbers. a number. the absence of a signal. MECH 1500 Quiz 2 Review Name: Class: Date:

Lecture (05) Boolean Algebra and Logic Gates

Institute of Engineering & Management

Parallel logic circuits

CHAPTER 4: Register Transfer Language and Microoperations

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

Transcription:

1/15

1.0 Introduction In 1840 Thomas Fowler, an English self-taught mathematician, invented a mechanical calculator that used, for the first time, the balanced ternary notation to perform calculations. The Balanced Ternary is a variant of the Base-3 notation in which each digit can be expressed as: Negative Zero Positive that is: -, 0, + (to Fowler). In 1997 drawings of this machine were found, executed in 1840 by the great mathematician: Augustus De Morgan. In the figure a modern realization printed in 3D based on these drawings. In 2018 a question arises spontaneously: are we ready to concretely use the balanced ternary? The project illustrated here with the implementation of the All Ternary Monadic Functions Generator Board and, above all, with Ternary Spacecraft Board proposes to make a small contribution to the study and to the full understanding of the Ternary Balanced Logic. 2/15

2.0 Ternary Logic: a "spacecraft" to explore it. The board design called Ternary Spacecraft was born with the aim of providing a tool to explore what will henceforth be referred to as the "Galaxy" of Ternary Logic. It consists of two parts: a hardware one and a software one. Everything started, in the last months, from the following two articles: Appunti Logica Ternaria Monadic and Diadic Ternary Logic Simulation Results published on my website https://giuseppetalarico.wordpress.com back in 2014. In the Binary system, all the logic functions with one input and one output (monadic functions) are: 2 ^ 2 = 4, as clearly shown in the table below: x f0(x) f1(x) f2(x) f3(x) 0 0 1 0 1 1 0 0 1 1 Among the four monadic functions, only one of them, f1 (x), leads to an elementary logic gate commonly used in the design of digital boards: the NOT. The functions with two inputs and one output (dyadic functions) are instead: 2 ^ 4 = 16, as clearly shown in the table below: x y 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 Among the 16 dyadic functions, six of them lead to usable elementary logic gates: AND [f8 (x, y)], NAND [f7 (x, y)], OR [f14 (x, y)], NOR [f1 (x, y)], XOR [f6 (x, y)], XNOR [f9 (x, y)]. If the logical dyadic functions are implemented with mux then all four monadic functions are used! 3/15

Things in the ternary system are slightly different: Number of monadic functions: 3 ^ 3 = 27. Number of dyadic functions: 3 ^ 9 = 19'683 (incredibly high number!) It is easy to assume that nobody has ever ventured into the complete exploration of such a large number of functions, also due to the lack, to date, of commercially available components able to operate on three levels. In this galaxy of possible components, most of them have neither a symbol nor a name. The Ternary Spacecraft, which can be interfaced with either Arduino or Raspberry or any other system equipped with I2C, allows you to generate and explore, thanks to the use of an oscilloscope: the 27 ternary logic gates with one input and one output; the 19'683 gates with two entrances and one exit. Ultimately, the card creates a "Programmable Universal Ternary Dyadic Logic Gate". It consists essentially of a 9: 1 mux, made from four Mux 3: 1, of nine Trit generators that feed the nine inputs of the first level mux 3: 1 and two additional Trit generators to realize two possible ternary signals to be sent to the inputs of the dyadic gate. By programming, from time to time, the ternary truth table of the logic gate (inputs of the Mux) it is possible to obtain all the approximately twenty thousand logical gates mentioned above. Eventually, by appropriately programming the input ternary signals, it is possible to display and study the output waveforms (from which to obtain useful information for a possible use of them in the future design of circuit boards in ternary logic). An entire computer can be made with only MUXes. In fact, the latter are able to realize any truth table and therefore any combinational logic function. Moreover, the sequential digital circuits present in each computer are obtained starting from the combinational circuits. 3.0 The Two-way Binary MUX Let s start with the operation of a simple 2: 1 binary Mux. It can be compared to a twoposition electro-mechanical selector. The "y" output is obtained by manually selecting one of the two possible inputs. In Mux 2: 1 the selection of the input bit, which is output (device output), is obtained through another selection bit "x" (which actually forms the device input). The two bits present at the inputs of the mux "I0", "I1" make the column of a Truth Table with only two lines. Ultimately, a Mux 2: 1 realizes a monadic device, that is with an input and an output, whose operation is regulated by a truth table consisting of a column and two lines. 4/15

In terms of binary algebra, the output of the mux has the following logical expression: y = (x * I0) + (x * I1) It is therefore an OR with two inputs, in turn made up of two dyadic AND whose inputs are: x, I0 for the first and x, I1 for the second. A mux can also be made from electronic switches and this is the way used to make the Ternary Spacecraft. As already mentioned, in the monadic binary case all the possible truth tables are four: 2 ^ (Number of Mux Input Bits). Ultimately, by imposing one of the four possible combinations as input to the mux it is possible to obtain one of the following four logical functions: Contradiction Buffer Not Tautology (always output at "0" whatever the value of the input) (Output equal to the input) (Input negation output) (always output at "1" whatever the value of the input) That is, in terms of truth tables: x f0(x) f1(x) f2(x) f3(x) 0 0 1 0 1 1 0 0 1 1 The function f0 (x) always returns 0 (false) and the function f3 (x) always returns 1 (true), regardless of the value of the input symbol. The function f2 (x) returns the same value as the input symbol and therefore is called the Identity or Buffer function. The function f1 (x) returns the negated of the input value and is the only non-trivial of the four. The function f1 (x) is called NOT (logical negation): f1(x) = NOT(x) The binary values of the four truth tables are nothing more than the two-bit binary count from zero to three. The number assigned to each function corresponds to the binary value of the two bits in the table. 5/15

The order of the columns of the four tables is completely arbitrary, so they can be arranged as follows: x f-2(x) f-1(x) f0(x) f1(x) 0 0 1 0 1 1 1 1 0 0 The binary values are arranged according to the two's complement notation. The following formula applies to the table as follows: fi (x) = NOT [f-i-1 (x)] with i in [0,1] This expression leads to formulating an interesting property that applies to the whole table: "Half of the table is obtained by complementing the other half". This implies that it is enough to study half the functions, the others will simply be the same but complemented. What for the binary system and especially for the monadic functions is more of a curiosity, for the ternary functions its application is definitely more interesting. 3.1 The Binary Mux 4:1 All sixteen possible two-input binary functions are shown in the table below, adopting the two-complement representation. At the top of each column is shown the subscript of the dyadic function: fi (x, y) with i = [- 8.7] x y -8-7 -6-5 -4-3 -2-1 0 1 2 3 4 5 6 7 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 The following formula applies to the table as follows: fi (x,y) = NOT[ f-i-1 (x,y) ] con i in [-8,7] As the highlights also suggest, half the table is obtained complementing, column by column, the other half. 6/15

Some notable features: the function of index -2, that is: f-2 (x, y), is: x OR y the function of index -8, that is: f-8 (x, y), is: x AND y the function of index 6, that is: f6 (x, y), is: x XOR y Furthermore: Since f7 (x, y) the NAND function, if x = 1, we have: f7 (1, y) = NOT (y) Being f1 (x, y) the function NOR, if x = 0, we have: f1 (0, y) = NOT (y) Since f6 (x, y) the function XOR, if x = 1, we have: f6 (1, y) = NOT (y) Notice also that: f3 (x, y) = NOT (x), for each y f-4 (x, y) = x, for each y thus, for what has been said before: f-4 (x, y) = NOT [f3 (x, y)] = NOT [NOT (x)] = x The mux 4: 1 allows to select (send in "output") a binary value between four, thanks to two inputs (binary signals) of selection "x" and "y" that make up the two true inputs of the dyadic device. The following figure shows the realization of such a device starting from three monadic 2: 1 muxes. Binary Dyadic Gate The previous scheme suggests that any binary dyadic function can be obtained starting from two monadic functions. The signal y selects from time to time which of the two monadic functions goes out, while the signal x has already selected which of the two possible monadic binary values, for both mux first level, they will form the inputs of the second level mux. This two-level mux model will come in handy later when we talk about the 9: 1 mux ternary. 7/15

4.0 The Ternary Mux 3:1 The 3: 1 mux has 3 trit (or 1 Tribble) configuration, a selection Trit and a ternary output (Trit). Its truth table: a c 1 I- 0 I0 1 I+ 8/15

The set of the 27 ternary monadic functions can be represented by the following truth tables, combined in a single one: X (i=) D C B A 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 A B C D 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 The function index, which in decimal would be i = [- 13.13], is here represented with the symbols in balanced eptaventesimal: i = [D, D]. x represents the input Trit, while fi (x) represents the output Trit of the monadic gate. [I +, I0, I-] represents the generic configuration Tribble of the ternary monadic gate (the set of three Trit is called Tribble). In this case, observing the table, one has the following property: fi (x) = NOT [f-i (x)] The index 0 function, called Unknown, divides the table into two. The two parts are the inverted copy of the other (note the colors). The index D function is called Contradiction. The index D function is called Tautology. All three functions mentioned do not translate into useful devices, but are used in the implementation of dyadic functions with mux! The Ternary Spacecraft board has three Monadic outputs: MonOut+ MonOut0 MonOutprogrammable and each can generate all 27 functions. Eventually, configuring via software, the three mux of the first level with the same value of Tribble, the Dyadic output is downgraded to the Monadic output of the input signal "a", independently from the signal of "b". 9/15

The following is the block diagram of the board:: All Ternary Monadic Functions Generator. The diagram shown above has been submitted to the selection of the Maker Faire Rome 2018. 10/15

4.1 The Ternary Mux 9:1 The 9: 1 mux has 9 trit (1 Tryte) configuration, two selection Trit and a ternary output (Trit). The truth table of the ternary 9: 1 MUX is as follows: a b c=f(a,b) 1 1 I-- 1 0 I-0 1 1 I-+ 0 1 I0-0 0 I00 0 1 I0+ 1 1 I+- 1 0 I+0 1 1 I++ 11/15

5.0 Ternary Spacecraft Board Block Diagram The following board diagram shows the design and implementation made for the Maker Faire Rome 2018. 12/15

5.1 Optical Interface with Raspberry Being the Ternary Spacecraft a "tweakable" board where to configure and/or display the ternary functions, an optical interface has been added to the design to safeguard the hardware integrity of the Raspberry or of the Arduino connected. Otherwise, an accidental short, even temporary, could have led to the failure of the I/O ports of the aforementioned devices. 5.2 Trit Generators The use of a DG 403, which consists of four analog electronic switches, allows to generate a trit. On the card there are nine Trit Generators to drive the dyadic port, that is to configure the nine ternary inputs of the 9: 1 mux, plus two more for the generation of the real ternary inputs of the dyadic device. Two I/O expansion circuits via the I2C standard interface are used to drive the DG403 selection inputs. Basically, a Bit-Trit decoder is implemented: Bit Trit 00 0 01 1 11 1 5.3 Ternary Dual Mux The Ternary Dual Mux allows the implementation of the "Programmable Universal Ternary Gate" or a 9: 1 mux ternary, through the adoption of four 3: 1 mux ternaries. The scheme is that of two-level muxes. 5.4 Generation of input signals "a" and "b" The Mux 9:1 input signals "a" and "b" can be provided from the two special trit generators on-board or from the outside. The hardware arrangement takes place through two specially made straps. Connecting INPUT_a with Tsignal_a and INPUT_b with Tsignal_b the signals come from within the board and are generated via software. 13/15

6.0 Ternary-Binary Compatibility If the generation of 1 is blocked by software, the board creates a "Universal Programmable Binary Gate" with which to obtain all 16 dyadic functions and 4 monadic ones. Both in Input and Output the signals assume the two classical values [0,1]. The following figure shows the board "downgrading": If instead, no "0" is ever generated by software, the board works in binary mode with non-standard levels, the extreme ones of the ternary. This mode has been called "binary mode PM" (PlusMinus). 14/15

7.0 Ternary Spacecraft Software The configuration and operating software of the board has been totally developed in Python and runs on a Raspberry Pi v2 or v3. It allows you to control both the first boards created: the "All Ternary Monadic Functions Generator Board" and the second called "Ternary Spacecraft". 8.0 Contacts Official Maker Faire project link: http://bit.ly/makerfaire2018 email: giustala@gmail.com 15/15