I have this question that's bugging my mind:
"Discuss by giving suitable examples the role of mathematical relations (Unary, binary and ternary) in computing."
I'm sure it's a very simple question, but the way it's been phrased is just killing me. Our lecturer is not a competent English speaker, so I find it incredibly difficult to understand the set questions.
Here's a couple other questions that he wrote:
What criteria this covers? Write a pseudo that display a triangle. The shape given below:
* * * * * * * * *Write a pseudo code that perform basic operations addition and subtraction on two matrices A and B. Both matrices have dimensions 2 x 2.
I've completed these tasks, but I need to understand what is meant by the initial task He wrote (in bold).
Here's the criteria that the question is meant to reach:
*Relations: domain, range, Cartesian product, universal relation, empty relation, inverse
relation, reflexive, symmetric and transitive properties, equivalence relations* -Note: this snippet is a quote from what the lecturer reads to create the tasks.
I have a good understanding of binary, but I cannot see how his question (in bold) relates to the criteria.
If someone could reword the question for me, or give me some insight into the mathematical relations He speaks of; I'd be very appreciative :)
Kind Regards, Josh Thomson
This is what I ended-up writing...
(by Josh Thomson)
Mathematical Relations in Computing
Computing is reliant upon countless mathematical operations, among which are core numeric systems such as ‘Unary’, ‘Binary’ and ‘Ternary’. These different numeric systems have their own uses in computing, but each share a common difference. The Unary number system has a base count of ‘1’, whereas binary’s base count is equal to ‘2’ and ternary’s base count is equal to ‘3’. Binary is a commonly spoken of system as it’s system is state is directly correlative when compared to electricity. Electricity is either ‘On’ or ‘Off’, which translates to the values ‘1’ and ‘0’ in binary.
If you look at the physical transistors on a processor or the memory locations on a hard disk, you will notice that there’s an array of values that are either on or off depending on their state. Of course, just having a system comprised of binary would be a nightmare; you’d have to manually encode your alphanumeric language into a unique set of patterns to convey a message across. Luckily this has been done for us. -The birth of American Standard Code. Aka ASCII as its latest version is called. This is a system that was developed to convert the binary values to meaningful text visa-versa.
So we’ve discussed the numerical bases of these different systems, but what about operators? …well In programming there are various operators that use these different systems depending on the operation that takes place.
Operation A:
A+=1; or A++; …this is an example of unary operation as it’s only operating on a single value by incrementing it by 1. This is often seen in loops to count the iterations through the loop, the value is increased each time... allowing for the loop to escape when the target value is reached... This is important to prevent a loop from turning 'infinite', which would cause problems with memory or perhaps crash the system if an escape clause is not triggered.
Operation B:
5+5 …this is a binary operation as it has two separate entities being involved in the operation. This will modify the initial value by applying the secondary value to itself ...returning the result of the addition of the two numbers. This is often seen in programming when adapting existing values with other variables or static values..
Operation C:
(4+4==8)? “True”: “False”; …This is a ternary operation as it has 3 entities involved in the operation, the two separate values and also the conditional result of the values in the operation. This will check whether 4 + 4 is equal to 8 or not and return the relative string result (being the third entity in the operation)
Another area of computing that uses a numeric system to create order is the network ‘domain’. This is a numerical value based on a 32 bit binary value. The domain range can be read in normal units as 0.0.0.0 to 255.255.255.255, though only a certain portion of these addresses are deemed usable as they have been set into segregated classes. Each type of class on the world wide web will have a different ratio of networks to hosts. The most common class used for the average End-User is Class C (the 192-223 address range)