java 逻辑表达式 布尔_使用基本逻辑门实现布尔表达式

java 逻辑表达式 布尔

将布尔表达式转换为逻辑电路 (Converting Boolean Expression to Logic Circuit)

The simplest way to convert a Boolean expression into a logical circuit is to follow the reverse approach in which we start from the output of the Boolean expression and reach towards the input.

将布尔表达式转换为逻辑电路的最简单方法是遵循相反的方法,在这种方法中,我们从布尔表达式的输出开始,然后向输入过渡。

Example1: Realize the Boolean Expression BC + A + (A + C) using AOI logic.

示例1:使用AOI逻辑实现布尔表达式BC + A + (A + C) 。

Solution:

解:

To realize this using the AOI logic gates, we will use the reverse approach.

为了使用AOI逻辑门来实现这一点,我们将使用相反的方法。

Step 1:

第1步:

Our expression BC + A + (A+C) is the summation of three terms BC, A and, (A+C), thus a 3-input OR Gate must have been used to obtain the expression as given :0

我们的表达BC + A +(A + C)是三个方面BC,A和(A + C)的总和,从而一个3输入OR门必须被用于获得表达给出:0

Realization of Boolean expressions using Basic Logic Gates (1)

Step 2:

第2步:

Now, BC and (A + C) both are inverted in nature, so they must have been inverted using a NOT Gate earlier. BC must have been obtained by inverting the input BC and (A + C) must have been obtained by inverting the input (A + C) both using the NOT Gate.

现在, BC和(A + C)本质上都是反向的,因此它们必须早先使用NOT门进行了反向。 BC必须已经通过反相输入BC获得,并且(A + C)必须已经通过使用NOT门将输入(A + C)反相获得。

Realization of Boolean expressions using Basic Logic Gates (2)

Step 3:

第三步:

Moving further, in the reverse direction we see, BC must have been an output of 2-input AND Gate with inputs as B and C. Likewise, (A + C) must have been obtained as the output of 2-input OR gate with A and C as the inputs.

再往相反方向看,BC必须是输入为B和C的2输入与门的输出。同样,必须获得(A + C)作为2输入与门的输出,其中A和C作为输入。

So, Final Logic Diagram for above given Boolean expression can be drawn as,

因此,以上给出的布尔表达式的最终逻辑图可以绘制为:

Realization of Boolean expressions using Basic Logic Gates (3)

将逻辑图转换为布尔表达式 (Converting Logic Diagrams into Boolean Expressions)

The easiest way to obtain the Boolean Expression from any logic circuit is to follow the forward propagation approach. In this, we start from the input side and move ahead until the output is reached. While moving from the input side to the output side, we continue evaluating the output of intermediate logic gates.

从任何逻辑电路获得布尔表达式的最简单方法是遵循正向传播方法。 在这种情况下,我们从输入端开始,然后继续前进,直到达到输出为止。 从输入端移至输出端时,我们继续评估中间逻辑门的输出。

Example 1: Find out the Boolean Expression for Logic Diagram given below and simplify the output in the minimal expression, also implement the simplified expression using the AOI logic.

示例1:找出下面给出的逻辑图布尔表达式,并以最小表达式简化输出,还使用AOI逻辑实现简化表达式。

Realization of Boolean expressions using Basic Logic Gates (4)

Solution:

解:

Following the forward propagation approach, we see that gate G1 is a 2-input AND Gate having inputs A and B. So, output of G1 will be AB. Similarly, G2 is an OR Gate, so output of G2 will be (B+C). Also, G3 is an AND Gate and its output will be AB.

按照前向传播方法,我们看到门G1是2输入与门,其输入A和B。因此,G1的输出将为AB。 同样,G2是“或”门,因此G2的输出为(B + C)。 同样,G3是与门,其输出将为AB。

Now, gate G4 is a 2-input OR Gate which has one of its inputs as A and the other one is the output of gate G1, thus the output of gate G4 will be (A + AB). Similarly, output for gate G5 and G6 will be (B + BC) and (C + AB) respectively. Now, gate G7 is a 3-input AND Gate, therefore output (Y) of G7 will be equal to (A+AB). (B+BC). (C+AB)

现在,门G4是2输入或门,其输入之一为A,另一个为门G1的输出,因此门G4的输出为(A + AB)。 同样,门G5和G6的输出分别为(B + BC)和(C + AB)。 现在,门G7是3输入与门,因此G7的输出(Y)等于(A + AB)。 (B + BC)。 (C + AB)

Realization of Boolean expressions using Basic Logic Gates (5)

Since, we have Y = (A+AB). (B+BC). (C+AB), now we have to minimize it.

因为,我们有Y =(A + AB)。 (B + BC)。 (C + AB) ,现在我们必须将其最小化。

    Therefore, (A+AB). (B+BC). (C+AB)
= A (1 + B). B (1 +C). (C+AB)
= A. B. (C+AB)		[Since, 1+B =1 and 1+C =1]
= AB (1 + C)
= AB

Therefore, Y=AB is the minimal expression. This can be implemented using a 2-input AND Gate having inputs A and B as:

因此, Y = AB最小表达式 。 这可以使用具有输入A和B的2输入与门实现:

Realization of Boolean expressions using Basic Logic Gates (6)

翻译自: https://www.includehelp.com/basics/realization-of-boolean-expressions-using-basic-logic-gates.aspx

java 逻辑表达式 布尔

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/542542.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

python自然语言处理书籍_精通Python自然语言处理pdf

自然语言处理(NLP)是有关计算语言学与人工智能的研究领域之一。NLP主要关注人机交互,它提供了计算机和人类之间的无缝交互,使得计算机在机器学习的帮助下理解人类语言。 本书详细介绍如何使用Python执行各种自然语言处理&#xff…

通达oa 2013 php解密,通达OA漏洞学习 - 安全先师的个人空间 - OSCHINA - 中文开源技术交流社区...

说明通达OA漏洞在去年上半年已爆出,这不趁着周末没事做,将源码下载下来进行复现学习。文件包含测试文件包含检测,payload1:ip/ispirit/interface/gateway.php?json{"url":"/general/../../mysql5/my.ini"}利用文件包含访…

温赵轮 访谈

“温赵轮”三大软狗,你听说过吗?今天的1024访谈录给大家介绍的就是程序员中当之无愧的偶像组合——温赵轮。 Winter寒冬。阿里P8,正在向P9的道路上奔跑。传说中的他有钱、出身好,可不是搞互联网的屌丝程序员。 老赵,…

linux开源文档管理系统_Linux中的系统管理员问题 免费和开源软件

linux开源文档管理系统根帐号 (Root Account) The "root" account is the most unrestrictive account on a Linux Operating system. This account enables you to complete all features of System admin, including accounts, changing client passwords, looking…

matlab上机实验1,上机实验1:熟悉matlab基本操作

其中 x 在 [-2, 2] 间共等切分为 21 点,y 在 [-1, 1] 间共等切分为 21 点,所以此曲面共有 21*21441 个点。a. 请用预设的颜色对应表(Colormap)来画出此曲面。 b. 请以曲面的斜率来设定曲面的颜色。 c. 请以曲面的曲率来设定曲面的颜色。2. 请用 meshc 指…

公众号 -「前端攻略 开光篇」

作为一枚程序员,每件重要项目的开始都忍不住使用"Hello World"。 这个公众号是不是来晚了?如果你有这个疑问,那么我想说:对于写作和思考,任何时候都不晚。我用四个简单的自问自答,来讲讲这个前端…

python 桌面应用 启动缓慢_如何加快Python 应用的启动时间

我听说pipenv9.0.2已经发布,启动时间有了很大的改进。 我很快就试了一下,但我觉得并不快。所以我用Python3.7的新特性来研究它。 在本文中,我将介绍该特性以及如何使用它。 启动时间≒导入时间 例如,pipenv -h 的执行时间比显示帮…

python单词首字母大写_在Python中将每个单词的首字母大写

python单词首字母大写Here, we are implementing a python program to capitalizes the first letter of each word in a string. 在这里,我们正在实现一个python程序来大写字符串中每个单词的首字母。 Example: 例: Input: "HELLO WORLD!"O…

matlab中求模最大,matlab求取模极大值时出错

本帖最后由 Nate_ 于 2016-4-17 15:57 编辑points1024 时,有波形输出,但信号有5438个点。改为5438就不行。主程序:%小波模极大值重构是采用的交替投影法close all;points5438; level4; sr360; num_inter6; wfdb4;%所处理数据的…

stl向量_如何检查C ++ STL中向量中是否存在元素?

stl向量Given a vector and an element to be searched in the vector. 给定一个向量和要在向量中搜索的元素。 To check whether an elements exists in a vector or not – we use find() function. find() function takes 3 arguments. 要检查向量中是否存在元素 –我们使用…

java socket如何请求485协议_javaSE第十五部分 网络编程(1)Socket和ServerSocket

网络编程基础知识C/S结构:全称为Client/Server结构,是指客户端和服务器结构。常见程序有QQ、迅雷等软件。B/S结构:全称为Browser/Server结构,是指浏览器和服务器结构。常见浏览器有谷歌、火狐等。两种架构各…

【分享】linux下u盘使用

2019独角兽企业重金招聘Python工程师标准>>> linux下u盘使用 方案一: Linux不像Windows一样,接上新硬件后可以自动识别,在Linux下无法自动识别新硬件的,需要手动去识别。USB移动存储设备通常被识别为sda1,…

kotlin中判断字符串_Kotlin程序删除字符串中所有出现的字符

kotlin中判断字符串Given a string and a character, we have to remove all occurrences of the character in given string. 给定一个字符串和一个字符,我们必须删除给定字符串中所有出现的字符。 Example: 例: Input:string "includeHelp Del…

Java9中使用jpa,jpa – eclipselink在Java 9上使用final字段进行静态编织

我有一些JPA注释字段,如下所示:Column(name "SOME_FIELD", updatable false, nullable false)private final String someField;当实体插入数据库时​​,这些字段存储在数据库中.它们无法进一步更新.对于Java编程语言,可以将这些字段视为final.使用Ecli…

python语言程序设计及医学应用_Python语言程序设计(高等学校计算机专业规划教材)...

第1章Python语言概述/1 1.1Python语言的发展1 1.1.1Python的起源1 1.1.2Python的发展2 1.2Python语言的特点2 1.2.1Python的特性2 1.2.2Python的缺点4 1.2.3Python与其他语言的比较5 1.3简单的Python程序介绍5 1.4Python的程序开发工具8 1.4.1Python的版本选择8 1.4.2Python的安…

swift 3.0 中使用 xib

文章写于2016年9月底,Xcode 8,swift 3.0真是蛋疼,折腾了很长时间,试了网上很多教程,结果又莫名的可以了! 1.方法和OC中一样 将一个xib文件和一个ViewController类进行关联的几步操作: command &…

数字图像处理图像反转的实现_使用8086微处理器反转16位数字

数字图像处理图像反转的实现Problem statement: 问题陈述: Write an assembly language program in 8086 microprocessor to reverse 16 bit number using 8 bits operation. 在8086微处理器中编写汇编语言程序,以使用8位操作反转16位数字。 Example: …

php猴子找大王算法,教程方法;php实现猴子选大王问题算法实例电脑技巧-琪琪词资源网...

琪琪词资源网-教程方法;php实现猴子选大王问题算法实例电脑技巧,以下是给大家带来的教程方法;php实现猴子选大王问题算法实例,大家可以了解一下哦!下面为你介绍php实现猴子选大王问题算法实例。本文实例讲述了php实现猴子选大王问题算法。分享给大家供大…

numpy 归一化_NumPy 数据归一化、可视化

仅使用 NumPy,下载数据,归一化,使用 seaborn 展示数据分布。下载数据import numpy as npurl https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.datawid np.genfromtxt(url, delimiter,, dtypefloat, usecols[1])仅提取…

java虚拟机规范阅读(三)异常

Java虚拟机里面的异常使用Throwable或其子类的实例来表示,抛异常的本质实际上是程序控制权的一种即时的、非局部(Nonlocal)的转换——从异常抛出的地方转换至处理异常的地方。绝大多数的异常的产生都是由于当前线程执行的某个操作所导致的&am…