Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on Is concatenation a logical AND?
Parent
Is concatenation a logical AND?
As a person with no significant background in mathematics and computer science I thought that concatenation and AND are logically identical if not very similar because both add something to something yet not by numerical addition (natural addition) so I found it sensical to say "x AND y" is weight to "x .
y". But of course I might be wrong, so I ask:
Is concatenation (for example, as with .
in PHP) a logical AND?
Post
It is OR.
Assimilate FALSE to the empty string, and TRUE to any other string:
ε CONCATENATE ε = ε
ε CONCATENATE something = something
something CONCATENATE ε = something
What about both sides at TRUE:
something CONCATENATE something = somethingsomething
But because any non empty string assimilates as TRUE:
something CONCATENATE something = something
1 comment thread