1. Home
  2. Computing & Technology
  3. Visual Basic
Symbolic Logic
    With Peter Zilahy Ingerman
Numbers and Logic

A lot of programmers today are click n' drag visual coders. The success of Visual Basic has demonstrated to the world that great programs can be created without coding the bits and bytes by hand. But that doesn't mean that great programmers can ignore the bits and bytes. There are times when you have to know the fundamentals. Some of the fundamentals include radix number systems (hex, octal binary) and how symbolic logic works (And, Xor and others). This week, we're going to cover symbolic logic and next week we'll give you the real scoop on number systems.

Here's another step up the ladder to becoming a great programmer!



 More of this Feature
• Part 2: The Basics of Symbolic Logic
• Part 3: Mapping Out Symbolic Logic
• Part 4: Going Behind the Symbolic Logic Mask
• Part 5: Visualize Symbolic Logic
 
 Join the Discussion
Is this the kind of article that helps you?
Let us know!
 
 Related Resources
• Calculating a Contrasting Color Code
The first article in the series. • The Imp Logical Operator
• VB .NET New Logical Operators AndAlso and OrElse
 
 Elsewhere on the Web
• Association for Symbolic Logic
• Karnaugh Maps
• A game for understanding Venn Diagrams
 

In the article Calculating a Contrasting Color Code a lot of the program code involved logical calculations and hexadecimal numbers in a Visual Basic program. For example, one statement was:

NewColor = _
  ((OldColor> Xor GreenMask) _
  And GreenMask) _
  Or (OldColor) _
  And Not GreenMask)

This type of statement is usually called a Boolean expression in the literature (that's the keyword you would use to look up information about it at Microsoft's MSDN web site). We referred to it as a logical calculation. The masking variables (GreenMask in this statement) were expressed as hexadecimal numbers.

You will run into this type of expression in a variety of different circumstances. One of the biggest uses of logical expressions is in writing SQL statements for databases. Although SQL is a language by itself - and it's not Visual Basic - the same principles will help you write and understand the Visual Basic statement and a SQL statement. Those principles are part of what is called Symbolic Logic. This is actually an academic discipline that people spend their whole lives studying. If you're interested, there are some very readable, but still very academic articles available on the Web at a site maintained by the Association for Symbolic Logic here.

We don't have to approach the subject with quite as much academic discipline to do great programming. But to get the most out of it, we should start at the beginning and do it right. And that means defining basic principles and working up from there.

Next page > The Basics of Symbolic Logic > Page 1, 2, 3, 4, 5
Explore Visual Basic
By Category
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2009 About.com, a part of The New York Times Company.

All rights reserved.