logic operation

honggarae 22/02/2022 890

Introduction

Logicoperationisalogicaldeductionmethodofnumbersymbolization,includingunion,intersection,andsubtraction.Thiskindoflogicoperationmethodisusedingraphicsprocessingoperationstomakesimplebasicgraphicscombinationsproducenewshapes,anddevelopfromtwo-dimensionallogicoperationstothree-dimensionalgraphicslogicoperations.

BecauseofthespecialcontributionofBooleaninsymboliclogicoperations,manycomputerlanguages​​calllogicaloperationsBooleanoperations,andtheresultsarecalledBooleanvalues.

MathematicalBooleanoperations

Generation

Booleanusesmathematicalmethodstostudylogicproblemsandsuccessfullyestablisheslogiccalculations.Heusesequationstoexpressjudgments,andseesreasoningasatransformationofequations.Theeffectivenessofthistransformationdoesnotdependonpeople'sinterpretationofsymbols,butonlyonthecombinationofsymbols.ThislogicaltheoryisoftencalledBooleanalgebra.Inthe1930s,logicalgebrawasappliedtocircuitsystems.Later,duetothedevelopmentofelectronictechnologyandcomputers,variouscomplexlarge-scalesystemsappeared,andtheirtransformationlawsalsoobeyedthelawsrevealedbyBoolean.

Representationmethod

"∨"means"or"

"∧"means"and".

"┐"means"Not".

"="means"equivalent".

1and0mean"true"and"false"

(Thereisanotherway,"+"means"or","·"means"and")

Basicconcepts

1.Logicalconstantsandvariables:Thereareonlytwologicalconstants,namely0and1,Usedtorepresenttwoopposinglogicstates.Likeordinaryalgebra,logicalvariablescanalsoberepresentedbyletters,symbols,numbersandtheircombinations,butthereareessentialdifferencesbetweenthem,becauselogicalconstantshaveonlytwovalues,namely0and1,andthereisnointermediatevalue.

2.Logicoperations:Inlogicalgebra,therearethreebasiclogicoperations:AND,OR,andNOT.Therearemanywaystoexpresslogicaloperations,suchasstatementdescriptions,logicalalgebraicexpressions,truthtables,Karnaughmaps,etc.

3.Logicalfunction:Logicalfunctionisanalgebraicformulaconnectedbylogicalvariablesandconstantsthroughoperators.Similarly,logicfunctionscanalsobeexpressedintheformoftablesandgraphs.

4.Logicalalgebra:Logicalalgebraisamathematicalsystemthatstudiestheoperationandsimplificationoflogicalfunctions.Thecalculationandsimplificationoflogicfunctionsarethefoundationofdigitalcircuitcoursesandthekeytodigitalcircuitanalysisanddesign.

ComputerprogrammingBooleanoperations

Logicoperationsareusuallyusedtotesttrueandfalsevalues.Themostcommonlogicoperationistheprocessingoftheloop,whichisusedtodeterminewhethertoleavethelooporcontinuetoexecutetheinstructionsintheloop.

Logicaloperatorsinvariousprogramminglanguages

table>

RuleofOperation

Combination\Result\Operator.....And.......Or.........Xor

0......0.......................0..........0............0

1......0.......................0..........1............1

0......1.......................0..........1............1

1......1.......................1..........1............0

Simplyspeaking

And:Truewhenthesameistrue

Or:Falsewhenthesameisfalse

Xor:Sameisfalse

p>

Three-dimensionalgraphicsBooleanoperation

Function

Boolean(Booleanoperation)performsunion,difference,andintersectionoperationsontwoormoreobjectstoobtainnewTheshapeoftheobject.Thesystemprovides4Booleanoperations:Union(Union),Intersection(Intersection)andSubtraction(Subtraction,includingA-BandB-A).

Effect

TheobjectcanmodifythetwooperandsatanytimeafterBooleanoperation.ThemethodandeffectofBooleanoperationcanalsobeeditedandmodified,andtheprocessofBooleanoperationmodificationcanberecorded.Itisananimation,showingamagicalcuttingeffect.

Components

TheparameterpanelofBoolean(Booleanoperation)canbedividedintothreeparts.

Booleanoperationpracticemodel:dice

PickBoolean(PickBooleanoperand)rollout

ThisrolloutisusedtopickoperandB.

InBooleanoperations,twoprimitiveobjectsarecalledoperands,oneiscalledoperandAandtheotheriscalledoperandB.BeforecreatingaBooleanoperation,youmustfirstselectanoriginalobjectintheview,thentheBooleanbuttoncanbeused.AfterenteringtheBooleanoperationcommandpanel,clickthePickOperandBcommandbuttontoselectthesecondoperand.

·PickOperandB:ClickthisbuttontoselectanotherobjectinthescenetocompleteBooleansynthesis.ThefouroptionsbelowareusedtocontroltheattributesofoperandB,andtheymustbedeterminedbeforepickingoperandB.

·Reference:UsethereferencecopyoftheoriginalobjectasoperandB.ChangingtheoriginalobjectinthefuturewillalsochangeoperandBintheBooleanobject,butchangingoperandBwillnotChangetheoriginalobject.

·Copy:CopytheoriginalobjectasoperandBwithoutchangingtheoriginalobject.Usethismethodwhentheoriginalobjectneedstobeusedforotherpurposes.

·Move:TheoriginalobjectisdirectlyusedasoperandB,anditwillnolongerexist.Choosethismethodwhentheoriginalobjecthasnootherpurpose.Thismodeisthedefaultmode.

·Instance(association):TheassociatedcopyoftheoriginalobjectisusedastheoperandB,andsubsequentmodificationstooneofthetwowillaffecttheotheratthesametime.

Parametersrollout

Theparametersoftherolloutcanbedividedintothreeareas.

Operands(operatingobject)optiongroup

Thisgroupofparametersisusedtodisplaythenamesofalloperandsandcanperformrelatedoperationsonthem.

OperandsList:Alloperandsarelistedinthislistboxforselectionduringeditingoperations.

Name:Displaythenameoftheoperationobjectselectedinthelistbox.Itcanbeedited.

ExtractOperand(ExtractOperand):Itre-extractsthecurrentlyspecifiedoperandintothesceneasanewusableobject,includingInstance(association)andCopy(copy)twoattributes.Inthisway,objectsthathaveenteredtheBooleanoperationcanstillbereleasedintothescene.Thisbuttoncanonlybeactivatedafterselectinganoperationobjectfromthelistboxaboveit.

Note:Thisbuttonisonlyavailableintheeditpanel.Whenthecreationpanelisactive,theoperationobjectcannotbeextractedfromtheBooleanobject.

Ithinkofthedeformedobjectmentionedabove,afterenteringthepreparedobjectfordeformation,itcannotreturntothescene.However,thereisanotherfeasiblemethodforthis,whichistousetheSnapshottooltocloneanewshapefromthedeformedkeyframesnapshot.

Operation(operationmode)optiongroup

Thisgroupofparametersprovides4operationmodestochoosefrom.

·Union(Union):Usedtomergetwoshapes,theintersectingpartwillbedeleted,andthetwoobjectswillbecomeoneobjectafterthecalculationiscompleted.

·Intersection(intersection):usedtokeeptheintersectingpartoftwoshapesanddeletethedisjointpart.

·Subtraction(A-B)(A-Bpart):SubtractthepartthatcoincideswiththeBobjectfromtheAobject.

·Subtraction(B-A)(B-Apart):SubtractthepartthatcoincideswiththeAobjectfromtheBobject.

Comparisonoftheabove4Booleanoperations.Fromlefttorightare:union,intersection,partA-B,partB-A.

·Cut(cut):CutoffobjectAwithobjectB,butdon'taddanypartofobjectBtoobjectA.WhentheCutradiobuttonisselected,itwillactivatethe4radiobuttonsbelowittoallowuserstoselectdifferenttypesofcuts.

·Refine:AddthenumberofverticesandedgesontheAobjectalongthesurfacewheretheBobjectandtheAobjectintersecttorefinethesurfaceoftheAobject.Inotherwords,thesurfaceoftheAobjectissubdividedaccordingtotheshapeoftheBobject.

·Split:ItsworkingmethodissimilartoRefine.It'sjustthatanextrarowofverticesisaddedtotheedgeofthepartwheretheobjectBcutstheobjectA.Usingthismethod,anobjectcanbedividedintotwopartsaccordingtotheshapeofotherobjects.

Comparedthesetworesectionmethods.ObjectAisacone,objectBisacuboid,fromlefttoright:Refine(refinement),Split(split).

·RemoveInside(removetheinside):deleteallthefragmentsoftheAobjectinsidetheBobject.ItsworkingmethodissimilartoSubtraction(A-B)(PartA-B),exceptthatthesurfaceofObjectBisalsoremovedatthesametime.

·RemoveOutside(removetheoutside):deleteallthefragmentsoftheAobjectoutsidetheBobject.ItsworkingmethodissimilartoIntersection,exceptthatthesurfaceofobjectBisalsocutoffatthesametime.

Display/Updaterollout

Thisrolloutparameterisusedtocontrolwhethertodisplaythecalculationresultintheviewandwhentorenewitaftereachmodification.Calculateandupdatetheview.

Displayoptiongroup

ThisgroupofparametersisusedtodeterminewhethertodisplaytheresultoftheBooleanoperationintheview.Itcontainsthreeoptions.

·Result:DisplaythecalculationresultofeachBooleanoperation.

·Operands(operatingobjects):OnlydisplayBooleancompositeobjectswithouttheresultsofoperations.Thiscanspeedupthedisplay.

·Result+HiddenOps(Result+HiddenOps):Displayhiddenoperandsinawireframewithinthecoloredentity,mainlyusedforeditingoperationsofdynamicBooleanoperations.

Updateoptiongroup

ThisgroupofparametersisusedtodeterminewhentorecalculateanddisplaytheBooleaneffect.

·Always:Booleanresultsaredisplayedimmediatelyaftereachoperation.

·WhenRendering:Recalculatetheupdateeffectonlyinthelastrendering.

·Manually(manual):selectthisoption,thefollowingUpdatebuttonisavailable,itprovidesmanualupdatecontrol.

·Update:Whenyouneedtowatchtheupdateeffect,pressthisbutton,andthesystemwillrecalculate.

Function

C

Pascal

Equalto

==

=

Notequalto

!=

Lessthan

Greaterthan

>

>

Lessthanorequalto

Greaterthanorequalto

>=

>=

and

&&

and

or

||

or

Non

!

not

ExclusiveOR

^

xor

Latest: FROM

Next: Self-organizing map