# What does the sharp sign mean in VHDL?

Discussion in 'VHDL' started by bigyellow, Jul 10, 2008.

1. ### bigyellowGuest

for example, In the code

constant A : std_logic_vector(7 downto 0) :=
conv_std_logic_vector(16#12#, 8);

what does the 16#12# mean here?

bigyellow, Jul 10, 2008

2. ### TrickyGuest

>
> OT2: How many examples are there of digit-strings N, M
> such that M /= N and N#M# = M#N# ???
> --

off the top of my head:

10#2# = 2#10 = 2
10#3# = 3#10 = 3
etc, forever
(1#10# is not a legal representation)

also, any combination of 11-19, eg 11#19 = 19#11, 13#16#

After this, differences gradually diverge, eg
11#20# = 22, 20#11# = 21 diff = 1
11#21# = 23, 21#11# = 22 diff = 1
.....
12#20# = 24, 20#12# = 22 diff = 2
12#21# = 25, 21#12# = 23 diff = 2
......
etc

so assuming thats all of them, then 56 + (infinity: 10#N#, N#10# where
N /= 0, 1 or 10)

I really ought to get back to work.

Tricky, Jul 10, 2008

3. ### diogratiaGuest

On Jul 11, 1:13 am, Tricky <> wrote:
> > OT2: How many examples are there of digit-strings N, M
> > such that M /= N and N#M# = M#N# ???
> > --

>
> off the top of my head:
>
> 10#2# = 2#10 = 2
> 10#3# = 3#10 = 3
> etc, forever
> (1#10# is not a legal representation)
>
> also, any combination of 11-19, eg 11#19 = 19#11, 13#16#
>
> After this, differences gradually diverge, eg
> 11#20# = 22, 20#11# = 21 diff = 1
> 11#21# = 23, 21#11# = 22 diff = 1
> ....
> 12#20# = 24, 20#12# = 22 diff = 2
> 12#21# = 25, 21#12# = 23 diff = 2
> .....
> etc
>
> so assuming thats all of them, then 56 + (infinity: 10#N#, N#10# where
> N /= 0, 1 or 10)
>

Not in VHDL:

13.4.2 Based literals

A based literal is an abstract literal expressed in a form that
specifies the base explicitly. The base must be at least two and at
most sixteen.

diogratia, Jul 11, 2008
4. ### diogratiaGuest

On Jul 11, 1:13 am, Tricky <> wrote:
> > OT2: How many examples are there of digit-strings N, M
> > such that M /= N and N#M# = M#N# ???
> > --

>
> off the top of my head:
>
> 10#2# = 2#10 = 2
> 10#3# = 3#10 = 3
> etc, forever
> (1#10# is not a legal representation)
>
> also, any combination of 11-19, eg 11#19 = 19#11, 13#16#
>
> After this, differences gradually diverge, eg
> 11#20# = 22, 20#11# = 21 diff = 1
> 11#21# = 23, 21#11# = 22 diff = 1
> ....
> 12#20# = 24, 20#12# = 22 diff = 2
> 12#21# = 25, 21#12# = 23 diff = 2
> .....
> etc
>
> so assuming thats all of them, then 56 + (infinity: 10#N#, N#10# where
> N /= 0, 1 or 10)
>
> I really ought to get back to work.

Not in VHDL:

13.4.2 Based literals

A based literal is an abstract literal expressed in a form that
specifies the base explicitly. The base must be at least two and at
most sixteen.

diogratia, Jul 11, 2008
5. ### MikeWhyGuest

"diogratia" <> wrote in message
news:...
> On Jul 11, 1:13 am, Tricky <> wrote:
>> > OT2: How many examples are there of digit-strings N, M
>> > such that M /= N and N#M# = M#N# ???
>> > --

>>
>> off the top of my head:
>>
>> 10#2# = 2#10 = 2
>> 10#3# = 3#10 = 3
>> etc, forever
>> (1#10# is not a legal representation)
>>
>> also, any combination of 11-19, eg 11#19 = 19#11, 13#16#
>>
>> After this, differences gradually diverge, eg
>> 11#20# = 22, 20#11# = 21 diff = 1
>> 11#21# = 23, 21#11# = 22 diff = 1
>> ....
>> 12#20# = 24, 20#12# = 22 diff = 2
>> 12#21# = 25, 21#12# = 23 diff = 2
>> .....
>> etc
>>
>> so assuming thats all of them, then 56 + (infinity: 10#N#, N#10# where
>> N /= 0, 1 or 10)
>>

> Not in VHDL:
>
> 13.4.2 Based literals
>
> A based literal is an abstract literal expressed in a form that
> specifies the base explicitly. The base must be at least two and at
> most sixteen.

The muse posed stipulated M /= N.

MikeWhy, Jul 12, 2008
6. ### diogratiaGuest

On Jul 12, 4:36 pm, "MikeWhy" <> wrote:
> "diogratia" <> wrote in message
>
> > On Jul 11, 1:13 am, Tricky <> wrote:
> >> > OT2: How many examples are there of digit-strings N, M
> >> > such that M /= N and N#M# = M#N# ???
> >> > --

>
> > Not in VHDL:

>
> > 13.4.2 Based literals

>
> > A based literal is an abstract literal expressed in a form that
> > specifies the base explicitly. The base must be at least two and at
> > most sixteen.

>
> The muse posed stipulated M /= N.

With based literals comprised of base and based integers substituted
appropriately for N and M in the expression described by:

N#M# = M#N#
e.g.:
2#10# = 10#2#

M is limited by the right hand based literal and N is limited by the
left hand based literal by acceptable values of the base. The base in
the domain 'at least two and at most sixteen'.

diogratia, Jul 12, 2008