#1 is not natural.
1. Every boy does not like dancing.
2. Not every boy likes dancing.
SO, is 1 same as 2 in meaning?
#1 is not natural.
It's also untrue. Many boys do like dancing.
#2 is true and natural.
Also, they are not the same in meaning.
1. 100% of boys do not like dancing.
2. Not 100% (maybe 5%, maybe 50%, maybe 99%) of boys like dancing. But there are definitely some boys who don't.
Despite its unnatural nature, "every boy does not like" can be interpreted two ways.
The set of "every boy" "does not like" = no boys like it.
Or "it's not true that every boy likes dancing."
If you have 100 boys, the first reading requires 100 boys to "not like" it, and the second allows 1 or 99 boys to like it.
I'm not a teacher, but I write for a living. Please don't ask me about 2nd conditionals, but I'm a safe bet for what reads well in (American) English.
It's like the proverbial expression, "All that is gold does not glitter."
It's unnatural to use propositional logic to interpret the meaning in this way: all gold fails to glitter.
The only rhetorically natural, though somewhat archaic, interpretation, is this: not all gold catches your eye by shining bright.
Though it's true, by today's conversational American-dominated mode of speech, 1. will strike most people today as a great big "what the heck?" Readers of older literature won't find any fault with it though, I feel.
Or, in propositional logic, "There exists x, such that x glitters, and x is not gold."
The meaning is that just because something looks shiny and bright doesn't mean it's worth anything.
It's "All that glitters is not gold" here too, meaning "Not everything that glitters is gold". I would not take it to mean "Everything that glitters is definitely something other than gold".
Remember - if you don't use correct capitalisation, punctuation and spacing, anything you write will be incorrect.
Cf. Tolkien. That version exists too: All that is gold does not glitter - Wikipedia, the free encyclopedia