Is there a formula for converting binary numbers to an ordered pair output?

AI Thread Summary
The discussion revolves around whether the ASCII table can be classified as a mathematical function. It is argued that the ASCII table does not qualify as a function since a decimal input can correspond to multiple outputs in hexadecimal and character formats. However, it is clarified that a function can have multiple outputs represented in different formats, as long as each input has a unique output. The conversation also touches on defining functions formally, considering whether to create multiple functions for different outputs or a single function that returns an entire row. Ultimately, the focus is on establishing a clear mathematical relationship between binary inputs and their corresponding outputs in the ASCII table.
Davega Putra
Messages
5
Reaction score
0

Homework Statement


One of the problem in my homework is a question that ask is ASCII table (https://en.wikipedia.org/wiki/ASCII) a function and require me to answer mathematically which i don't know how.

Homework Equations

The Attempt at a Solution


I think ASCII table is not a function because if we get the decimal numbers to be the domain, it won't be a function since it's not assigned exactly one output since a particular decimal number have equivalents in hex and char. I want to do a vertical line test but i don't know how to graph it
 
Physics news on Phys.org
Davega Putra said:

Homework Statement


One of the problem in my homework is a question that ask is ASCII table (https://en.wikipedia.org/wiki/ASCII) a function and require me to answer mathematically which i don't know how.

Homework Equations

The Attempt at a Solution


I think ASCII table is not a function because if we get the decimal numbers to be the domain, it won't be a function since it's not assigned exactly one output since a particular decimal number have equivalents in hex and char. I want to do a vertical line test but i don't know how to graph it
Decimal and hexadecimal representations of a particular integer have nothing to do with whether something is a function. Each form is a different representation of the same number. There's nothing in the definition of a function which says that f(x) = x2 must use only decimal notation for the input and output.

Code:
 --------- x ---------   -------- f(x) ---------
 (decimal)     (hex)     (decimal)      (hex)
     0            0          0            0
     1            1          1            1
     2            2          4            4
     4            4         16           10
    10            A        100           64
 
So what is the definition of a function?
For any single input, there is a unique output. That output might be multiple columns.
Domain of x might be decimal, and the range of x might be the entire row where x is found.
input (x) --> output [ bin(x), hex(x), x, oct(x), glyph(x)]
or, it could simply be input decimal and output glyph.
The question is, for any x, could there be two outputs? which is different from one output with two (or more) entries.
 
SteamKing said:
Decimal and hexadecimal representations of a particular integer have nothing to do with whether something is a function. Each form is a different representation of the same number. There's nothing in the definition of a function which says that f(x) = x2 must use only decimal notation for the input and output.

Code:
--------- x ---------   -------- f(x) ---------
(decimal)     (hex)     (decimal)      (hex)
     0            0          0            0
     1            1          1            1
     2            2          4            4
     4            4         16           10
    10            A        100           64
RUber said:
So what is the definition of a function?
For any single input, there is a unique output. That output might be multiple columns.
Domain of x might be decimal, and the range of x might be the entire row where x is found.
input (x) --> output [ bin(x), hex(x), x, oct(x), glyph(x)]
or, it could simply be input decimal and output glyph.
The question is, for any x, could there be two outputs? which is different from one output with two (or more) entries.
Thanks for the reply! sorry for the late response, so ASCII table can be a function with the output consisting of multiple column, now i have to define the function by interval notation. I need help though, as i only able to define function that are very simple.
 
This is a pretty simple function. Give it a value in one format, it returns the same value in a different format.
What is "interval notation"? Is that defining the domain and range?
First you have to decide what your function does. Is it a function that takes a decimal value and translates it to just one column? Is the column to translate into an additional input variable? Does the function return an entire row?

The table on its own cannot be called a function since there is no sense of what you are putting in or getting out.
 
RUber said:
This is a pretty simple function. Give it a value in one format, it returns the same value in a different format.
What is "interval notation"? Is that defining the domain and range?
First you have to decide what your function does. Is it a function that takes a decimal value and translates it to just one column? Is the column to translate into an additional input variable? Does the function return an entire row?

The table on its own cannot be called a function since there is no sense of what you are putting in or getting out.
RUber said:
This is a pretty simple function. Give it a value in one format, it returns the same value in a different format.
What is "interval notation"? Is that defining the domain and range?
First you have to decide what your function does. Is it a function that takes a decimal value and translates it to just one column? Is the column to translate into an additional input variable? Does the function return an entire row?

The table on its own cannot be called a function since there is no sense of what you are putting in or getting out.

No i was mistaken, what i meant is defining the function like this
Let D = {1, 2, 3}
Let C = {X | X ∈ ℕ+}
F ∶ D → C= f(x)= 4- x

Define the function formally or mathematically my lecturer said.

Does it make sense if i create a group of functions where each returns 1 output for every input? (i build a group of function with an input of decimal, each returning hexa,char and so on) or would it make more sense to make a single function where the output returns and entire row?
 
Davega Putra said:
No i was mistaken, what i meant is defining the function like this
Let D = {1, 2, 3}
Let C = {X | X ∈ ℕ+}
F ∶ D → C= f(x)= 4- x

Define the function formally or mathematically my lecturer said.

Does it make sense if i create a group of functions where each returns 1 output for every input? (i build a group of function with an input of decimal, each returning hexa,char and so on) or would it make more sense to make a single function where the output returns and entire row?
The hexadecimal equivalent for the input is furnished purely as a courtesy to the computer types, so they can easily decode the input value in terms of binary digits (1's and 0's)

In the ASCII table shown in the Wiki article, they don't even bother with hex, but the table is based on the ASCII code written using 7 bits (a bit is a binary digit).

In other words, forget about the hex.
 
Davega Putra said:

Homework Statement


One of the problem in my homework is a question that ask is ASCII table (https://en.wikipedia.org/wiki/ASCII) a function and require me to answer mathematically which i don't know how.

Homework Equations



The Attempt at a Solution


I think ASCII table is not a function because if we get the decimal numbers to be the domain, it won't be a function since it's not assigned exactly one output since a particular decimal number have equivalents in hex and char. I want to do a vertical line test but i don't know how to graph it
Please state the entire question as it was given to you.

As RUber pointed out, it's absolutely important that it's clear as to what is the output of this relation which you are working with.

What is the domain and what is the co-domain?
 
SammyS said:
Please state the entire question as it was given to you.

As RUber pointed out, it's absolutely important that it's clear as to what is the output of this relation which you are working with.

What is the domain and what is the co-domain?
81910.jpg
 
  • #10
Perhaps your rule of correspondence is supposed to take you from some number (whether it's in decimal or hex or binary or octal or whatever base) to an ordered pair consisting of a row number and a column number .
 
  • #11
SammyS said:
Perhaps your rule of correspondence is supposed to take you from some number (whether it's in decimal or hex or binary or octal or whatever base) to an ordered pair consisting of a row number and a column number .
Can you give an example, i don't quite get it
 
  • #12
Davega Putra said:
Can you give an example, i don't quite get it
For instance:The function (if it is a function) maps the number (0101001)2 to the 10th row and 3rd column of the table of characters which contains the character " ) " ,the right parenthesis .
 
  • #13
I would infer that the input is the binary, however you might know how to define that set from (0000000) to (1111111), and the output would be the set of 128 unique values in the table. As SammyS said, it might be easier to define a functional relationship it you define the table value by the (row, column) they are in.
 
  • #14
Have you made any progress on this problem?

you might define spaces like ##\mathbb{Z}^{0,127}_{B7}:## the 7 digit binary set of integers from 0 to 127,
##\mathbb{Z}^{0,15}:## the set of integers from 0 to 15, and ##\mathbb{Z}^{0,7}:## the set of integers from 0 to 7.
Then your notation might look something like ##f:\mathbb{Z}^{0,127}_{B7}\to \mathbb{Z}^{0,15}\times \mathbb{Z}^{0,7}##
However, it seems like the question is asking you to write out the mathematical function to go from a binary input to an ordered pair output. Can you define that function?

You might find it convenient to be able to refer to your individual digits, ##( b_6, b_5, b_4, b_3, b_2, b_1, b_0) ##.
 
Back
Top