派︰《 λ 運算︰概念導引之《補充》※真假祇是個選擇?? 》文中講︰作者不知義大利羅馬的『真理之口』將會如何來決定『何謂是真 ?』而『什麼又是假』的呢??
又為什麼『真』與『假』的 λ表達式是
的呢?如果我們將『運算』看成『黑箱』,用『實驗』的方法來『研究』輸入輸出的『關係』,這一組有兩個輸入端的黑箱,對於任意的輸入『二元組』pair ,有︰
,於是將結論歸結成︰貼『真』標籤的箱子的『作用』是『選擇』輸入的『第一項』將之輸出;而貼『假』標籤的箱子的『作用』是『選擇』輸入的『第二項』將之輸出。
假使一位『軟體』工程師在函式『除錯』時,可能會採取在那個『函式』內『輸出』看看得到的『輸入』參數值是否正確?
於是將結論歸結成︰『真』標識符的函式『作用』是『選擇』輸入參數的『第一項』;『假』標識符的函式『作用』是『選擇』輸入參數的『第二項』。
那麼對一個已經打開的『白箱』,又知道作用的『函式』,怎麼會概念上『一頭霧水』的呢??如果細思一個邱奇自然數『 0 』, ,這跟『假』的 λ表達式有什麼不一樣的呢?那難道我們能說『0』就是『假』的嗎?在《布林代數》中的『0』與『1』其實是未定義的『兩態』基元概念── 就像歐式幾何學裡的『點』、『線』和『面』是『基本』概念一樣 ──,因此不管說它是『電壓高低』或者講它是『電流有無』的『數位設計』可以應用布林代數。要是我們將『0』『1』與『假』『真』概念連繫起來看,『布林邏輯』就是『真假』是什麼的『系統化』之概念內涵開展,它的『整體內容』呈現『兩態邏輯』的『方方面面』,縱使至於『孤虛』NAND 一個邏輯概念就足夠了,對於『 0 與 1 』概念本身還是『三緘其口』。……
『孤虛者』有言︰
物有無者,非真假也。苟日新,日日新,又日新。真假者,物之論也。論也者,當或不當而已矣。故世有孤虛者,言有孤虛論。
可以『中行獨復,以從道也。』,不至『迷復,凶』矣!
試問彼此井通,『彼』之『出』為『此』之『入』;『此』之『出』為『彼』之『入』。若以『此』觀『出入』者,實乃『彼』之『入出』也。故知所謂『出入』,相對『己我』所定之『名義』 ,存立論之所也。因而推知『有無』者『天地』之『然或不然』;『真假』者『理則』之『當或不當』。倘將『有無』匹配『真假 』,終有『正反』兩說,『正言正說』── 真有,假無 ── 以及『正言若反』── 真無,假有 ── ,各站其『立場』者耶!!
Logic 101 – Part 2 – Positive vs Negative Logic
Clive Maxfield
11/21/2006 04:00 AM EST
The terms positive logic and negative logic refer to two conventions that dictate the relationship between logical values and the physical voltages used to represent them. Unfortunately, although the core concepts are relatively simple, fully comprehending all of the implications associated with these conventions requires an exercise in lateral thinking sufficient to make even the strongest amongst us break down and weep!
Before plunging into the fray, it is important to understand that logic 0 and logic 1 are always equivalent to the Boolean logic concepts of False and True, respectively (unless you’re really taking a walk on the wild side, in which case all bets are off). The reason these terms are used interchangeably is that digital functions can be considered to represent either logical or arithmetic operations (Fig 1).
1. Logical versus arithmetic views of a digital function.
Physical-to-abstract mapping (NMOS logic)
OK, let’s gird up our loins and meander our way through the morass one step at a time. The process of relating logical values to physical voltages begins by defining the frames of reference to be used. One absolute frame of reference is provided by truth tables, which are always associated with specific functions (Fig 2).
2. Absolute relationships between truth tables and functions.
3. The physical mapping of an NMOS logic gate.
4. The physical to abstract mapping of an NMOS logic gate.
△ 細讀
樹莓派 SAKS 擴展板上手把玩 之 絢麗的流水燈
,方知實習 機板,是『負邏輯』且四顆藍色 LED 與四位數碼管之位選針『共用』。無怪乎!☹ 昨兒覺的莫名其妙!!☿☺
root@raspberrypi:/home/pi# python3 Python 3.2.3 (default, Mar 1 2013, 11:53:50) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import RPi.GPIO as GPIO >>> GPIO.setmode(GPIO.BCM) >>> # 選取負邏輯 >>> 四位數碼管位選一 = 17 >>> 四位數碼管位選二 = 27 >>> 四位數碼管位選三 = 22 >>> 四位數碼管位選四 = 10 >>> 位選關 = GPIO.HIGH >>> 藍一LED = 5 >>> LED亮 = GPIO.LOW >>> LED滅 = GPIO.HIGH # 方將設定 GPIO.OUT,□ 就亮,雖然文件有『初始值』設法,卻錯過! # 後讀《樹莓派 SAKS 擴展板上手把玩 之 絢麗的流水燈》,始知情。 # 又憶 Python 線上幫手︰ >>> help(GPIO.setup) # Help on built-in function setup in module RPi.GPIO: # setup(...) # Set up a GPIO channel or list of channels with a # direction and (optional) pull/up down control # channel - either board pin number or BCM number # depending on which mode is set. # direction - IN or OUT # [pull_up_down] - PUD_OFF (default), PUD_UP or PUD_DOWN # [initial] - Initial value for an output channel # (END) # 故可如此賦值 >>> GPIO.setup(四位數碼管位選一, GPIO.OUT, initial=位選關) >>> GPIO.setup(四位數碼管位選二, GPIO.OUT, initial=位選關) >>> GPIO.setup(四位數碼管位選三, GPIO.OUT, initial=位選關) >>> GPIO.setup(四位數碼管位選四, GPIO.OUT, initial=位選關) >>> GPIO.setup(藍一LED, GPIO.OUT, initial=LED滅) >>> # 一償昨日之願 >>> GPIO.output(藍一LED, LED亮) >>> GPIO.output(藍一LED, LED滅)