Boolean Algebra Toolbox 2.2 Matlab script

SPONSORED LINKS

    Specification

  • Version: 2.2
  • File size: 0 KB
  • File name: bool.2.2.tar.gz
  • Last update:
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • Language: Matlab
  • Price:Freeware
  • Company: Rasmus Anthin (View more)

Boolean Algebra Toolbox 2.2 script description:




Publisher review:
Boolean Algebra Toolbox - Generate nbc and gray code, boolean evaluation and display truth-table. Boolean Algebra Toolbox is a small set of functions for easy generation of boolean nbc and gray sequences for sets of boolean variables.

[X1 X2...]=NBC(N) will generate a table of Natural Binary Code where the output is a set of bool-objects.

[X1 X2 X3]=NBC(3) yields:» [x1 x2 x3]=nbc(3)x1 =0101 0101 x2 =0011 0011 x3 =0000 1111 and BGRAY(3) yields:» [x1 x2 x3]=grayc(3)x1 =0110 0110 x2 =0011 1100 x3 =0000 1111 The constructor for the bool-class works as this:» x=bool([1 inf 0 -1 0 nan])x =1101 01of course, the constructor can also have a bool object as an argument.B2H(X) is a function which converts a binary vector to hex string (length(X)=2^n is required).The operators used are : or| : or* : and& : and~ : not' : not/ : xoryou can use inequalities as well:< > = == ~=some functions used by the bool class:b2d : "bool" to decimalb2h : "bool" to hexdisplay : display objectdouble : convert to double arrayflip : flip the entire boolean object stringflip4 : flips the overall nibble positionflip4i : flips the bit positions for each nibbleflip8 : same as flip4 but for bytesflip8i : same as flip4i but for byteshorzcat : bit string concatenation, works with mixed objects (as [0 x1 1 nan x2])length : length of the bit-string/bool-objectsize : size of object in bits, nibbles, bytes, words, etc... depending on structure.subsasgn : assign with indiciessubsref : pick out bits from the object string with indicies (subscripted reference).Last but not least, the truth-table function which displays the truth-table for a boolean function with its set of variables. For instance:» [x1 x2 x3]=nbc(3);» func=x1'*x2 x3'/x1 x1*x2'*x3;» btab(func,x1,x2,x3) ------------- ---------- | x1 x2 x3 | func(*) | ------------- ---------- | 0 0 0 | 1 || 1 0 0 | 0 || 0 1 0 | 1 || 1 1 0 | 0 || 0 0 1 | 0 || 1 0 1 | 1 || 0 1 1 | 1 || 1 1 1 | 1 | ------------- ---------- » I know that there might be some strange stuff goin on with the order (little/big endian a.s.o.), which is one of the reasons I implemented the flip-functions.
Boolean Algebra Toolbox 2.2 is a Matlab script for Mathematics scripts design by Rasmus Anthin. It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.

Operating system:
Windows / Linux / Mac OS / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5